We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

HasRole Condition in flow?

Marvin16
Tera Contributor

Hello,

is there any easy way to have an "user.hasRole("myRole") condition within the flow designer? I cannot find anything to check for user roles 😞

 

best regards

1 ACCEPTED SOLUTION

yes for that you have to add custom action here 

 

 

If my answer helped you, kindly mark it as correct and helpful.

View solution in original post

7 REPLIES 7

hvrdhn88
Giga Patron

gs.hasRole("itil")  did not work ?

 

can you add some screenshot ?

How can you use scripts in flow designer conditions?

find_real_file.png

did you try with lookup record action ?

screenshot for reference. 

 

 

find_real_file.png

Yeah that would work for sure, but i have multiple role checks within my flow. So i guess i am forced to write a custom action in order to fulfill my needs. Thought there must have been an easier solution. Thanks anyway!