web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

using 'IN' operator in filter query in Ms flow or logic app

(0) ShareShare
ReportReport
Posted on by 370

Hi all, I need to retrieve some data from SQL DB using SQL connector in Ms Flow or a Logic App.

I need to use a operator 'IN' which is a very common operator for SQL queries ans now also available in Dynamics CRM for lookup and option-sets.

I could have used execute SQL query step but since that operation is unsupported for  'On-Premise Data Gateway', so i am left with GET Rows option provided by SQL connector

which is very similar like the List Records option of CDS connector. Now i can't use the In operator here in filter query, i need to filter records based on a Alternate ID (Select * from Table where AlternateId in (1,2,3,4)).  Has someone achieved a similar requirement any suggestions or refrences would be most welcome,

chrome_5F00_LOiD3c3ORH.png

Inkedchrome_5F00_E0PWtvhShm_5F00_LI.jpg

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: using 'IN' operator in filter query in Ms flow or logic app

    Hi Prem,

    The ‘IN’ operator is a shorthand for multiple OR conditions.

    So you can combine ‘eq’ and ‘or’ operators to replace ‘in’ operator.

    Just like: AlternateId eq 1 or AlternateId eq 2 or AlternateId eq 3 or AlternateId eq 4

    You can refer following link to see more about operators of filter query:

    https://diyd365.com/2019/11/20/every-power-automate-ms-flow-filter-query-you-ever-wanted-to-know-as-a-functional-consultant/

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 241

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 164 Super User 2025 Season 2

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 153

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans