Check if Value exist in Flow Designer

Ziad Qadora
Kilo Sage

Hello,

I'm creating my flow using flow designer and I have a question regarding retrieving the answer to question on a catalog item.  

My Catalog item ask the user for a group name that they would like to create and a list of users to add to the group once it is created.

I have done the following:

1. Set my trigger to service catalog

2. Added an Action to get the Catalog Variables

I need to add a flow logic to check if the group name entered does not exist in the sys_user_group table. Any recommendation on how to do that?  

Regards,

Ziad

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Refer below link for help:

In Flow Designer, could I use a condition - If record exist

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Ziad,

You can use look up records action in the flow designer to check if the group record exists or not. Depending on the count output variable you can include an if logic i.e if (count == 0) then create a new group record.

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/flow-designer/referen...

https://community.servicenow.com/community?id=community_question&sys_id=69e96495dbf89c505ed4a851ca96...

Ziad Qadora
Kilo Sage

Hi Pradeep,

Thank you for your response. 

In our case, we first need to retrieve the value for the group name entered by the user.  

How do we retrieve what was entered by the user?

Regards,

 

Ziad

You can use Get Catalog Variable action to pull the variable info and use the output of the variable pill in the next action i.e lookup for records action.

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/flow-designer/referen...

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Refer below link for help:

In Flow Designer, could I use a condition - If record exist

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader