cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MichaGue
Resolver I
Resolver I

Edit/View selected item in nested gallery

Hello, I use two galleries to display the content of a SharePoint list. The galleries are nested within each other. Gallery 1 (gal_Component_Accordion) serves as a "pre-filter" in the function of a accordion.

 

Items Gallery 1:

[
    {
        ID: 1,
        Name: "Parts in stock"
    },
    {
        ID: 2,
        Name: "Parts out of stock"
    }
]

 

Based on the selection of Gallery 1, a filter is used to display the content of Gallery 2 (gal_Component_ComponentList).

If(var_Component_ShowId=1,Filter([@tbl_CCM_Component],StatusStock.Value = "In Stock"),Filter([@tbl_CCM_Component],StatusStock.Value = "Out of Stock"))

 

Up to here, everything works without problems.

 

Now I want to display the content of an item in a form by clicking on it in Gallery 2. Data source of the View Form is [@tbl_CCM_Component].

 

If I now enter "gal_Component_ComponentList.Selected" under items of the View Form, this is not accepted. "Selected" is marked as an error with a red wavy line.

 

Any ideas?

 

Thanks a lot and best regards,

Michael

1 ACCEPTED SOLUTION

Accepted Solutions
Ashwin7104
Super User
Super User

Hey @MichaGue ,

 

Please try the below link
https://powerusers.microsoft.com/t5/Building-Power-Apps/View-Form-to-Display-Selected-Gallery-Item/t...

 

Or

 

Make it as gal_Component_ComponentList.Selected.ID in view form datasource

Lookup(yourdatasource, ID = gal_Component_ComponentList.Selected.ID)

 

View solution in original post

2 REPLIES 2
Tchesco
Resolver I
Resolver I

Hi @MichaGue,

 

You can set a variable, eg: Set(var_gal_Component_ComponentList, ThisItem), and use this variable under the items of the view form.

Ashwin7104
Super User
Super User

Hey @MichaGue ,

 

Please try the below link
https://powerusers.microsoft.com/t5/Building-Power-Apps/View-Form-to-Display-Selected-Gallery-Item/t...

 

Or

 

Make it as gal_Component_ComponentList.Selected.ID in view form datasource

Lookup(yourdatasource, ID = gal_Component_ComponentList.Selected.ID)

 

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 (4,655)