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 ?