Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Filter SQL table with odata by a list of comma-seperated unique ids inside an SQL Get Rows Action Filter Query

(0) ShareShare
ReportReport
Posted on by

Hi,

I am trying to build a flow where I am passing list of unique ids in comma separated string.
I want to use this list to read the user's information from SQL, but I am not good with odata query filters, I am getting an error when I test the flow.

Can anyone suggest a solution?  - how to filter with list of ID's and get information of those ID's

 

Example :

Filter Query : ColumnName in ( 67, 68, 72)

 

Thanks!!

  • 55552 Profile Picture
    669 on at
    Re: Filter SQL table with odata by a list of comma-seperated unique ids inside an SQL Get Rows Action Filter Query

    what if your list of items to filter by was variable each time the flow ran? Any way to handle that? I may have a list like "A", "B", "D", "F". Can I use some sort of concatenate function with a compose statement prior to the Get Rows action to convert that to MyColumnName eq 'A' or MyColumnName eq "B", etc.?

  • hemajm Profile Picture
    on at
    Re: Filter SQL table with odata by a list of comma-seperated unique ids inside an SQL Get Rows Action Filter Query

    Thank You !! @lbendlin 

     

  • lbendlin Profile Picture
    7,941 Super User 2025 Season 1 on at
    Re: Filter SQL table with odata by a list of comma-seperated unique ids inside an SQL Get Rows Action Filter Query

    I did some tests, and guess what - the IN operator is not supported in that filter query. HOWEVER (!!!) the OR operator is supported (even though it should not be!)

    Try this one 

     

    CTR_ID eq '000001994' or CTR_ID eq '000000932'

  • hemajm Profile Picture
    on at
    Re: Filter SQL table with odata by a list of comma-seperated unique ids inside an SQL Get Rows Action Filter Query

    Thanks for the response!!😊

     

    Here my column name is CTR_ID and I am passing list of unique ids in comma separated string to SQL to get the rows of those ID's

     

    The Query I am passing is CTR_ID in ('000001994','000000932')

     

    hemajm_0-1693576929850.png

    can you suggest me with right query.

  • lbendlin Profile Picture
    7,941 Super User 2025 Season 1 on at
    Re: Filter SQL table with odata by a list of comma-seperated unique ids inside an SQL Get Rows Action Filter Query

    It is not clear what position 9 is - can you please clarify?

     

    May need extra escaping of the single quotes.

  • hemajm Profile Picture
    on at
    Re: Filter SQL table with odata by a list of comma-seperated unique ids inside an SQL Get Rows Action Filter Query

    I am facing this issue with the filter query can you help me with right one.

    hemajm_1-1693547443200.png

     

    hemajm_0-1693547410518.png

     

    Thanks!!

  • lbendlin Profile Picture
    7,941 Super User 2025 Season 1 on at
    Re: Filter SQL table with odata by a list of comma-seperated unique ids inside an SQL Get Rows Action Filter Query

    That should work. Please show what you have done so far.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >