Flow Designer Contains if condition

bhardwajm
Tera Contributor

Hi AlL,

 

Created a custom table with some keywords record, needed to match where shirt description 

contains one the keyword, Loop should run and check each keyword individually one by one and five result as true on matching

 

Use if ""contains" conditon

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@bhardwajm 

so where are you stuck?

share screenshots

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

Karunakaran
Giga Guru

Hi  @bhardwajm 

 

if your requirement is a desired number of keywords, please use if statement with AND conditions..

example:

Karunakaran_0-1780319667531.png

 



if it is not desired number of keywords and you want to fetch it from a custom table.. you need to get the keyword records and create an action with script step.

 

Hope this helps.

Tanushree Maiti
Tera Patron

Hi @bhardwajm 

 

1) retrieve the keywords from your custom table.

  • Add a Look Up Records action.
  • Select your custom keywords table.
  • Leave the conditions blank to fetch all records, or filter for active keywords.

 

2) Iterate through the retrieved records one by one.

  • Add a For Each Item logic block.
  • Drag the Keywords Records list from the Data Panel into the items field.

 

3)Evaluate your target record's short description against the current keyword in the loop.

  • Inside the For Each loop, add an If decision logic block.
  • Set the condition: [Target Record -> Short Description] Contains [For Each -> Keyword Record -> Keyword Field].

4) Define what happens when a match is found.

  • Inside the If block, add your desired action (e.g., Update Record, Create Task etc).
Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti