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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help with IN/NOT IN query
Power Apps
Unanswered

Help with IN/NOT IN query

(0) ShareShare
ReportReport
Posted on by

I've the following query:

 

SELECT *

FROM A

WHERE id NOT IN (SELECT id_A FROM A_B)

OR id IN (SELECT id_A FROM A_B WHERE c = 2)

 

id_A is a foreign key from A imported in A_B.

What's the equivalent for IN and NOT in operator for powerapp? Many thanks in advance.

I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Anonymous ,

    Do you want to achieve your search query using PowerApps formula as your SQL syntax?

     

    Based on the needs that you mentioned, I have made a test on my side. Please consider take a try with the following workaround:

    Add a Gallery within your app, set the Items property to following:

    Filter(
     '[dbo].[A]',
     Not(id in '[dbo].[A_B]'.id_A) || id in Filter('[dbo].[A_B]', c=2).id_A
    )

    Note: The IN operator in SQL Server is equivalent to in operator, the NOT IN operator is equivalent to Not(.. in ...) formula as above.

     

    More details about the operators supported in PowerApps, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/operators

     

    More details about the Filter function, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

     

    Best regards,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard