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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Need Advice write code...
Power Apps
Answered

Need Advice write code in power apps using filter or search or any other function

(0) ShareShare
ReportReport
Posted on by 85

Please advice me best practice to write code in power in following scenario..

 

How can write code in power apps using fliter or search functions
Select empid from empmaster where emplocation = varLocation and empid not in ( select empid from employeeOOO )

 

I tried following code .. It work fine when "NOT" is used.. However , my requirements is to use "NOT"

Filter(empmaster, emplocation = varLocation, Not(empid in employeeOOO.empid))  -- > Zero records
Filter(empmaster, emplocation = varLocation, (empid in employeeOOO.empid))  -- > Records display which matching in employeeOOO table

Categories:
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @yashgoyal ,

    What is your data source type and how many records are in each list ?

  • yashgoyal Profile Picture
    85 on at

    Greetings @WarrenBelz ,  Data source is Tables in Powerapps platform. SharePoint list

     

    yashgoyal_0-1716350045805.png

     

  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    @yashgoyal ,

    Second question I asked - how many records do you have in each list?

  • yashgoyal Profile Picture
    85 on at

    Each table around 100 records each

  • Verified answer
    WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @yashgoyal ,

    I was trying to establish if Delegation was an issue and if the data source should handle the query - the answer to this is no and yes, so not much progress. Based in what you posted, I will try a variation, but it really is the same thing

    With(
     {
     _Data: 
     Filter(
     empmaster, 
     emplocation = varLocation
     ),
     _Emp000: employeeOOO
     },
     Filter(
     _Data, 
     !(empid in _EmpOOO.empid)
     )
    ) 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard