Flow - Look up record

hadron_collider
Tera Contributor

Hello,

 

Anyone knows if it is possible to check if a record with particular parameters already exists?

 

In this flow i want to check if it already exists, if no to create one or if yes to create a record on another table.

kata90_0-1700756619094.png

 

kata90_1-1700756645194.png

 

kata90_2-1700756679798.png

 

 

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@hadron_collider Instead of using Look up Record, you can choose to use Look up Records action. Look up Records action returns an additional output variable count which can be checked via an if block to check if the record already exists on the table or not.

 

Screenshot 2023-11-23 at 11.20.50 PM.pngScreenshot 2023-11-23 at 11.21.33 PM.png

For more information on Look up Records, please refer to https://docs.servicenow.com/bundle/vancouver-build-workflows/page/administer/flow-designer/reference...

View solution in original post

4 REPLIES 4

Sonam_Tiwari
Kilo Sage

Hi @hadron_collider ,

From the docs - StatusData type: Choice

0 if a record was found successfully, and 1 if there was an error.

sonamtiwari_0-1700758471935.png



Link : https://docs.servicenow.com/bundle/vancouver-build-workflows/page/administer/flow-designer/reference...

I believe status should help you identify whether or not there is a record that's existing.



 

Consider indicating the response as helpful and marking it as correct if it meets your needs.

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @hadron_collider 

 

Have a look on 

 

https://www.servicenow.com/community/now-platform-forum/in-flow-designer-could-i-use-a-condition-if-...

 

Not exact , but similar. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Sandeep Rajput
Tera Patron
Tera Patron

@hadron_collider Instead of using Look up Record, you can choose to use Look up Records action. Look up Records action returns an additional output variable count which can be checked via an if block to check if the record already exists on the table or not.

 

Screenshot 2023-11-23 at 11.20.50 PM.pngScreenshot 2023-11-23 at 11.21.33 PM.png

For more information on Look up Records, please refer to https://docs.servicenow.com/bundle/vancouver-build-workflows/page/administer/flow-designer/reference...

Indeed, this is the right solution. Thank you!