Hi, I hope following is what you after.
//store the cityid in a variable
int cityID = integer.parse(K2.ProcessInstance.DataFields["CityID"].Value.ToString());
// conditionally set the value of the EmailRecipient Datafield
if(cityID == 1)
K2.ProcessInstance.DataFieldsF"EmailRecipient"].Value = "smith";
else if(cityID == 2)
K2.ProcessInstance.DataFieldse"EmailRecipient"].Value = "jon";
else(cityID == 3)
K2.ProcessInstance.DataFieldsn"EmailRecipient"].Value = "claire";
HTH
Good luck!
HTH,
Thanks for that info. Where would i put that code for the workflow to evaluate it? thanks.
Hi, The code should be put in a Server Event.
Add an activity before your email activity and drag a server event and put your code in it.
Thanks
Nadun
Thanks Nadun, that did the trick!
You are welcome! Glad to have been of assistance to you.
Nadun