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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Want ComboBox DefaultS...
Power Apps
Unanswered

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
    Re: Want ComboBox DefaultSelectedItems within Gallery to Filter table based on whether ThisItem/current Gallery record is in or equals contents of LookUp column.

    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

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 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard