cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
Super User
Super User

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?

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'.

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

kmponcet
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,503)