AppWorx, Dollar Universe and Sysload Community

 View Only
  • 1.  sql to get user email address

    Posted Jun 15, 2020 08:36 AM
    I created a subvar called #user_email, that is a character and is defined as :
    select u.so_email
    from appworx.so_job_history h,
    appworx.so_user_table u
    where so_chain_id = {chain_id}
    and so_job_seq = {chain_seq}
    and h.so_user_seq = u.so_user_seq

    Then I do a subvar assignment #cjmuseremail={#userid_email}

    and I do not get a value.

    If I change the user_email subvar value to

    select 'select u.so_email
    from appworx.so_job_history h,
    appworx.so_user_table u
    where so_chain_id = ' || {chain_id} ||
    ' and so_job_seq = ' ||
    {chain_seq} ||
    ' and h.so_user_seq = u.so_user_seq ' from dual

    and run it, the sql statement is returned to cjmuseremail, with the values of chain_id and chain_seq inserted.
    I can then run that sql in a sql tool, against the Appworx db, and i get the email value.

    I have tried numerous variations of the brackets, quotes, and # with the chain_id and chain_seq variables.
    How can i get Appl Mngr to return the users email into my cjmuseremail subvar ?


  • 2.  RE: sql to get user email address
    Best Answer

    Posted Jun 16, 2020 09:23 AM
    So after banging my head against a wall for a day, I figured out that the appworx.so_job_history 
    record , for the chain_id that is currently running is not available, thus not found condition is met. 
    Record is only available after the process has completed.