Skip to main content

In my task form, I would like to make a field required if a certain condition is met. The condition I want to evaluate is if the current user is listed in a person field that allows multiple values.

 

I figure using a direct comparison such as == won't work as the multi-person field may contain many values and it will never evaluate to true. So how can I compare the current user to multiple people value field?

 

Scenario:

The Assignee field has three people listed in it. If the Current User is listed as one of the three people in that field, then make valField required.

 

Any ideas?

I think I figured it out for anyone who is looking to do the same:



 



Use the "Set Variable" action and configure it to set a text variable to be the multi-value person field you want to analyze. But use the "Advanced Lookup" instead of the right pane because you will want to click on the 'x' icon to store it as "Display Names, semi-colon delimited". Click Insert and then Save.



 





 



Then, once you have set the variable...



In the Task form, click on the field you want to be required under the condition that the Current User is one of the people in the multi-value person field and give it the rule:



 



contains([Workflow Variables].[variableYouStoredItIn],[Context].[Current user display name])


Reply