Skip to main content

Notifications

Power Automate - General Discussion
Answered

compare list with string

(0) ShareShare
ReportReport
Posted on by 35

hi Team,

I have column Title. I need to find out if Title CONTAINS {"City","Right","Fuel","Person"} keywords. If yes then do operations.
how do i compare multiple keywords at a time.

Regards,

 

Categories:
  • Verified answer
    Re: compare list with string

    Hi @Narendra90 ,

    Contains can only be used once in a FilterQuery of [List rows present in a table]

     

    Please use [Filter array] after [List rows present in a table]

    Choose "Edit in advanced mode"

    vchengfenmsft_1-1670319403616.png

     

    Set the value:

    @and(contains(item()?['Title'], 'City'),contains(item()?['Title'], 'Right'),contains(item()?['Title'], 'Fuel'),contains(item()?['Title'], 'Person'))

    vchengfenmsft_0-1670319344852.png

     

     

    Here is a link for your reference:

    Power Automate Filter Array + Examples - EnjoySharePoint

     

     

    Best Regards

    Cheng Feng

  • Narendra90 Profile Picture
    Narendra90 35 on at
    Re: compare list with string

    datasource is excel file located on sharepoint. It contains all the keywords.

  • Re: compare list with string

    Hi @Narendra90 ,

    Could you please tell me what is the data source?

    Here is a test about share point list

    Please try Filter Query

    substringof('City', Title) or substringof('Right', Title) or substringof('Fuel', Title) or substringof('Personl', Title)

    vchengfenmsft_1-1670313613917.png

     

     

    Here is a link for your reference:

    Power Automate OData filter query with examples - SPGuides

     

     

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

    Best Regards

    Cheng Feng

  • Sundeep_Malik Profile Picture
    Sundeep_Malik 6,480 on at
    Re: compare list with string

    Hey @Narendra90 

     

    So, you are checking if the title contains one of these???

     

    Then you can do something like this:

     

    Sundeep_Malik_0-1670313011739.png

     

    Click on the add and click on add a row

    Sundeep_Malik_1-1670313047222.png

    And then click above and click on OR.

    Sundeep_Malik_0-1670313514062.png

     

    I hope this was you were looking for. 🙂

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard