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 / Filter Data by more th...
Power Apps
Answered

Filter Data by more than one column - Matches different filters

(0) ShareShare
ReportReport
Posted on by 85

In my canvas app, I want to filter and get data that matches one or more columns.  Currently I am getting a collection by filtering a CDS (Dataverse) table:

 

ClearCollect(
collActiveRequests,
Filter(
'ASR Requests',
'ASR Requests (Views)'.'Active Requests'
)

 

Now I want to filter so that I get all records which match one of the conditions:

1. UserField1 = User()  

2. UserField2 = User()  

3. UserField3 = User()

 

As you can see I want to get all records in which the current user has one or more association with the record and put it in a collection. 

 

Any ideas please?

 

Categories:
I have the same question (0)
  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    The simplest thing to do with User contextual record filtering, in Dataverse, is to have the view do it for you.

    You are already using a filtered view, so it's just a case of having another view.

    For example:

    • Create a new view, or copy an existing one, and call it "My ASR Requests" or something similar
    • Update the filtering criteria on the view
      • Add the User fields, and use the "Equals Current User" operator
      • Group those fields together as an OR clause
    • Save and publish the view

    Something like this:

    GarethPrisk_0-1634749567936.png

     

    Now your collect can leverage this relatively complicated/expensive query, via the view, and your coding logic is much simpler.

    That being said, you're already doing a collect and subject to delegation. You could just get the user's record from looking them up in the Users table, and set it as a variable. Then you'd add individual checks in an OR group in the query, to get the records. This will likely be much slower than using the view.

  • deg85 Profile Picture
    85 on at

    Yes, i think this makes sense, thanks for the help!

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard