I'm having trouble getting this to work. I am looking to email 1 email address on the first submission count but then each submission count after that, it should go to a different email address. I've been playing around with the logic below but can't get things to work. The first email address continues to get the email regardless of how many times the jobs has been submitted. I've put WOB.email in the email notification so when i run the job for the first time, it resolves to the first address. Even after resetting the email notification to WOB.email then resubmitting, it still goes to the first address
if (WOB._subcount = 1) WOB.email = 'adress1';else WOB.email = 'address2';
Looking at it , I think the problem is with comparison , i think it should have double equal to sign (==). Please check if that helps! Here you are assigning value rather than comparing.
I believe this is the case: