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 / Want ComboBox DefaultS...
Power Apps
Answered

Want ComboBox DefaultSelectedItems within Gallery to Filter table based on whether ThisItem/current Gallery record is in or equals contents of LookUp column.

(0) ShareShare
ReportReport
Posted on by 32

Hi all,

 

I have a Dataverse table called 'Task Forces.' There is another table called 'Assets,' which contain assets to be assigned to task forces. The 'Assets' table has a lookup column relating to the 'Task Force' table, so that each asset can be assigned to only one 'Task Force.' This column is called 'TFA,' for 'Task Force Assignment.'

 

Within Power Apps, I have a Gallery that displays data from the 'Task Forces' table. This gallery has a ComboBox where I have listed assets from the 'Assets' table. I would like the ComboBox to have DefaultSelectedItems that is a Filtered list from 'Assets' where the 'TAF' (Task Force Assignment) column value matches ThisItem or ThisItem.Name, so that each ComboBox in the gallery has appropriately pre-selected assets that have been already been assigned to each individual task force.

 

I would believe the answer would be as simple as Filter(Assets, TFA in ThisItem.Name), or a similar variant (= instead of in, ThisItem instead of ThisItem.Name, etc.), but I haven't been able to figure out how to filter based on ThisItem matching the lookup field contents no matter what I do.

 

Thank you for your help. I've really been struggling with this one.

 

Edit: Corrected where I referenced the wrong table in my code example.

I have the same question (0)
  • Verified answer
    LasVincent Profile Picture
    32 on at

    I finally got it to work. The code was:

     

    Filter(Assets, TFA.Name in ThisItem.Name)

     

    Thanks everyone who looked.

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
Haque Profile Picture

Haque 103

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
wolenberg_ Profile Picture

wolenberg_ 67 Super User 2026 Season 1

Last 30 days Overall leaderboard