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 / Filtering a collection
Power Apps
Answered

Filtering a collection

(0) ShareShare
ReportReport
Posted on by 20

I am fairly new to powerapps, and I need to filter a collection based on a selected item. The Collection I am using is a clone of a sql table, and I have a working filter for the sql table. 

 

*This works*
Filter(
'[dbo].[equipment2]',
location = Text(ItemSelected.first_name) & " " & Text(ItemSelected.last_name))

 

*This doesn't* (This is my collection)
Filter(
EquipmentMaster,
location = Text(ItemSelected.first_name) & " " & Text(ItemSelected.last_name))

Is there a different syntax when working with collections? Thank you for the help


Categories:
  • Verified answer
    nickduxfield Profile Picture
    497 on at

    Out of curiosity,

    Can you build the collection with a join of the first and last name into a single text column.

    Then try the code again omitting the join of a space (&" "&)

  • PaulD1 Profile Picture
    2,914 on at

    How large (how many rows) is your collection? Could you have hit a delegation limit when cloning your datasource to your collection and the record you want is not present?

    As standard the delegation limit is 500 but can be increased to 2000 in App Settings. If the record you want is not in the first 500 rows then maybe it wasn't 'cloned'.

  • TMelton Profile Picture
    20 on at

    Hi, I was in the process of combining the names, but for some reason it decided to work today with the old argument. Not sure why it wanted to play nice today. Thanks for the help, I am still going to join the coloumns however.

  • nickduxfield Profile Picture
    497 on at

     

    Regarding your syntax

    I was thinking of your scenario a little more.

    You have 2 drop downs with the rule of both value having to be available before a result can be filtered.

    You may like to use

    -A calculated column to join the name into 'first last name' then a single combo box to search,

    Filter(
    '[dbo].[equipment2]',
    location = Text(ItemSelected.fullname)

     

    -A || or in the syntax so that you can always get a hit on the results. 

    Filter(
    '[dbo].[equipment2]',
    location = Text(ItemSelected.first_name) || Text(ItemSelected.last_name))

     

    More:

    Because you are creating a collection you can shape on the ay in. Sometimes that can help, sometimes its not needed.

    But referring to another suggestion you have here, make sure there is no delegation issue with your collection creation either OnStart or however you trigger it. Otherwise the item will not be availbale to filter.

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 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard