I have a user picker that selects max 3 users. In the process model I want to send the email to all the users in the array of users.
Discussion posts and replies are publicly visible
Can you share what you've already tried and what difficulty you're having? In general (assuming a valid array of users with valid email addresses) this is usually pretty straight forward, IIRC, because you can just target your user array in the "to:" field of the Send Email node.
Hi,
As Mike mentioned it is straight forward implementation. In your process add a process variable of type user (It should be Array type). Then save your selected picker field values/users to this process variable. In your email node call this process variable in TO field using expression editor.
toemailaddress(pv!reportRequest.reviewer)and the reviewer variable just has the array of users with valid email addresses
If pv!reportRequest.reviewer is user type, I don't think you even need to wrap it in toEmailAddress(). That function seems to only be needed when you want to target plaintext email addresses as recipients. In fact it might be hurting you here, because if you wrap an array of user in this function, it might accidentally be trying to treat their usernames as email addresses, which would definitely not work. But again I'm not sure since you haven't actually said what's working / not working.
Tried this method however script task isn't saving reviewer to selected users
if possible con you share your code and screenshots of process configuration. It is difficult to answer whit out knowing what you have done
oludareo0002 said:Tried this method however script task isn't saving reviewer to selected users
well, that means your problem isn't in the send email node, for one thing. As Naresh already said, please share the expression code where you're attempting to set the value of pv!selectedUsers so we can help troubleshoot. To confirm, are you saying that PV is ending up blank? Or some other issue? Can you confirm what type it is? As in, is it "User" type with "multiple" selected?
Type is user script task before the email to store reviewer variable into created process variable
Did you verify the pv!reportRequest.reviewer have any value? you will be able to find this value from your existing instance process details or process properties.