cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Filter a form based on Gallery selection

I have an app with 3 screens & 2 data sources ("Properties" & "Spaces")

When I switch to screen 3 by clicking "Space Availability" button, I would like to present data from "Spaces" related to selected record.

 

• 1st screen: gallery(BrowseGallery1) which contains all Properties (data source=Properties)

• 2nd screen: form w/details of the selected property (data source=Properties)

• 3rd screen: form w/details on the spaces available in the selected property (data source=Spaces)

 

I am having trouble with the form on the 3rd screen, it will not display any data. 

This is the formula I have which does not work

Filter(Spaces, spacestoprop = BrowseGallery1.Selected.PrimaryId)

•spacestoprop is the lookup on the Spaces entity

 

New to PowerApps, any help would be greatly appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: Filter a form based on Gallery selection

It seems I was missing part of the formula. My new formula looks like this and it's working

Filter(Spaces, spacestoprop.PrimaryId = BrowseGallery1.Selected.PrimaryId)

 

Thanks for the info on forms!

View solution in original post

4 REPLIES 4
Highlighted
Power Participant
Power Participant

Re: Filter a form based on Gallery selection

Is there one and only one record in Spaces for each Property? Is that record created already?

 

If you have a form you only want to display one record, so the Item property of the form should be a Lookup, not a Filter (Filter gives many records, Lookup only one).

 

If you want to show all the records, use a gallery instead of a form; then your formula ought to work.

 

Can you share some screen shots, showing where it goes wrong?

Highlighted
Anonymous
Not applicable

Re: Filter a form based on Gallery selection

Ah I see what you mean. The problem is, there are several Space records for each Property. My mistake, I thought a form would give me a list of all the Spaces available for that specific property. Now I tried creating and filtering the gallery and this is what i get.Capture.PNG Highlighted operation is not supported by column 'spacestoprop'.

Highlighted
Anonymous
Not applicable

Re: Filter a form based on Gallery selection

It seems I was missing part of the formula. My new formula looks like this and it's working

Filter(Spaces, spacestoprop.PrimaryId = BrowseGallery1.Selected.PrimaryId)

 

Thanks for the info on forms!

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Filter a form based on Gallery selection

I'm encountering the same issue but I'm unsure where you defined your spacestoprop lookup. I'm very new to PowerApps but I'd like to accomplish the same thing you described. 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,940)