cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
d3ell
Helper V
Helper V

Filter a Gallery from a dropdown list

Hi,

 

Thought this would be simple one, but i cant quite get it to work,

 

I have an edit form that i want the data to be populated from my gallery (Gallery1) for a specific record when this record is chosen in a dropdown box.

 

the Dropdown box is called "DDEditDevelopment" and this pulls data from the gallery (Gallery1) using the syntax below to show all the current developments we have.

Sort(Gallery1.AllItems,Development_Name,Ascending)

On my form (Which is on a seperate screen) i want the data to be populated where this Development is selected. 

 

The Datasource of the form is my Developments Sharepoint list,

 

The item fx i'm using the following but getting re squiggly lines - Can anyone help?

Filter(Gallery1.AllItems,Development_Name=DDEditDevelopment.Selected.Development_Name)

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuxima-msft
Community Support
Community Support

Hi @d3ell 

 

Could you please change your formula expression as this?

LookUp(Gallery1.AllItems,Development_Name=DDEditDevelopment.Selected.Development_Name) 

 

Best Regards.

Yumia

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @d3ell ,

 

I did not get your point of having a dropdown, when all the data is already available in Gallery1.

 

OnSelect of a record in gallery, you can write below code to populate your form

 

EditForm(Form1); Navigate(screen2, Fade)
  1. Form1 is the name of from on screen2
  2. Form1 Datasource = Development
  3. Form1 >  Advanced Property > Item:  Lookup(Development, DevelopmentName = Gallery1.Selected.developmentName)

Use SP ID field in Filter instead of Name field.

 

Thanks.

 

v-yuxima-msft
Community Support
Community Support

Hi @d3ell 

 

Could you please change your formula expression as this?

LookUp(Gallery1.AllItems,Development_Name=DDEditDevelopment.Selected.Development_Name) 

 

Best Regards.

Yumia

Yes! Lookup! - wish id thought of that! - Thanks very much for your input! Much appreciated! 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,263)