I have a form using two columns (act:attorneyEmail and act:contactEmail) from a table names Accounts.
As the user accepts act:attorneyEmail, I want to default contactEmail to the same value, if contactEmail doesn't already have a value.
I found that p_web.SetSessionValue('act:contactemail',act:attorneyemail) will set the value correctly, but I can't get this to operate conditionally. Here's what I tried (among many other things):
if p_web.IfExistsSessionValue('act:ContactEmail') = 0
p_web.SetSessionValue('act:contactemail',act:attorneyemail)
end
In this code, the contactEmail is ALWAYS updated to equal attorneyEmail. I found IfExistsSessionValue is always returning "1", even when I haven't yet touched contactEmail.
Obviously there's something very basic I don't yet understand. Help would be appreciated.
Alan