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

Announcements

No record found.

News and Announcements icon
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

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 184 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 125

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans