I'm attempting to craft an update table script that takes the information stored in Field A and adds it to Field B, depending on certain conditions. I managed to get the script to work, but if the script is triggered by editing the data in Field A, Field B gets updated with the old value of Field A, not the new value.
Example.
Field A has a value of 1234
Field A is modified to have a value of 12345
Update table script fires after edit is saved, and Field B now has a value of 1234.
Is there any way to refer to the post-update value in the table script?
Thanks in advance.
My Script:
// if comp_EIN is greater than zero, append it to comp_ssnein
if (comp_EIN > 0 && comp_classification == 'Employer') {
// sql string that will do the update for this company
sql = "UPDATE Company SET comp_ssnein=comp_EIN WHERE comp_CompanyId=" + eWare.GetContextInfo('Company','Comp_CompanyId')
UpdateQuery = eWare.CreateQueryObj(sql);
UpdateQuery.ExecSql();}
}