Skip to main content

Notifications

Community site session details

Community site session details

Session Id : p5rW63DpvJcaOl7JxlPavS
Power Apps - Building Power Apps
Answered

Filter a form based on Gallery selection

Like (0) ShareShare
ReportReport
Posted on 20 Sep 2017 14:39:39 by

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.

 

Categories:
  • Community Power Platform Member Profile Picture
    on 12 Sep 2018 at 15:12:38
    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. 

  • Verified answer
    Community Power Platform Member Profile Picture
    on 20 Sep 2017 at 16:46:41
    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!

  • Community Power Platform Member Profile Picture
    on 20 Sep 2017 at 15:23:23
    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'.

  • BitLord69 Profile Picture
    914 on 20 Sep 2017 at 15:04:41
    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?

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard