Reputation: 507
I am trying to create a power automate workflow on new item being added to SharePoint list. Now I need an email sent when a new item is added to the list AND column name manager ( matches any of the set of values ( which could be like 50 users) I know I could use the trigger condition but how can I make the trigger condition regex use a set of value.
manager in ( 'John','Mary','Eric'.......etc)
Upvotes: 0
Views: 664
Reputation: 11262
I think this trigger condition will work for you ...
@greater(length(intersection(createArray(triggerBody()['Editor']['DisplayName']), createArray('John', 'Mary', 'Eric'))), 0)
Obviously, you can change the field that the trigger runs off but I picked the Editor/DisplayName field as it looked like the one that made the most sense.
Take note as well, it will look for full proper display names, it must match, it's not regex
or contains
, it's a perfect match.
Regex natively in PowerAutomate does not currently exist so this is your best bet I'd say.
Upvotes: 0