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

Nested gallery, trying to collect data from 1st sub gallery

Just started with powerapps and my first post in this community is a question, sorry, anyway this is a great tool  kudos to microsoft PowerApps team and community, this has a lot of potential like my darling PowerBI 🙂

 

I'm trying to build an asset ordering tool, I have created a collapsable subgallery inside main gallery. Main gallery which contains the contry+client code from PowerBI data integration and Subgallery from Catalog.xlsx

 

When I'm trying to Collect data from the 1st subgallery as show in the screenshot, the Order.Value and Units.Value(true and 3 respectively on the sample below) are not being fetched. The weird thing is it only happen on the 1st subgallery/row, when I expand the 2nd up to last and ClearCollect from there it's working fine.

 

I have seen a post about some issue with 1st subgallery not showing from this link:

https://powerusers.microsoft.com/t5/General-Discussion/Nested-Gallery-1st-Item-not-displaying-sub-ga...

but the solution there didn't worked on my case, on my it's showing I'm just not able to fetch the selected/input value

 

Please use below as reference, let me know if you need other info that can be of help.

 

Capture.PNG

 

Appreciate any help, thanks in advance.

13 REPLIES 13

Hi @wyotim,

Thanks for explaining this, for now I will eloborate some more on the dubble click issue. I have got a nested gallery with records. For now it contains some dummy data (in Dutch). As soon as I click a record, the view form shows me the data through the hidden gallery. As soon I click a new record the view form shows me a dutch message which is translated: "There is no item to display". As soon as I click the record for the second time it does show up in the viewform. 

I want it this way because I want to show the attachments that below to the corresponding list items.

The code I use:

For the records (ending with a number) in the nested gallery I use for OnSelect:

UpdateContext({HiddenGalleryID:ThisItem.Id})

For the hidden gallery I use for Items:

Filter(Processenboek; ID = HiddenGalleryID)

For the viewform I use for Items:

HiddenGallery.Selected

Hope this explains my situation, it would be awesome if you could shine your light on this;)


wyotim
Resident Rockstar
Resident Rockstar

Hey @itsJoost, apologies for the late reply; life's been a little busier than I like it lately! Smiley Frustrated Smiley Very Happy

 

After looking at your examples, I made a test app in the same way you described. Unfortunately, I couldn't replicate the issue you are experiencing. For the record, I am using sample data from an Excel document on OneDrive for Business, so I don't know if your data source has a part in the issue you are experiencing.  

 

One suggestion: rather than collecting the ID and using the hidden gallery for the form, what about using the variable itself to feed the form? this would bypass the need for the hidden gallery altogether. So in the OnSelect, try:

// OnSelect of the nested gallery item
UpdateContext({FormItem:ThisItem})

Then in the form's Item property, put:

// Item property of the form
FormItem


I tested this method and it worked, but that isn't too helpful as I couldn't replicate the issue in the first place. Maybe try it out and let me know if it works. I'll respond in a more timely manner this time!

Thanks @wyotim - I have been battling with this issue, and your solution will resolve it.

I was just wondering though, it is now two a bit years later - has Microsoft resolved this, or has anyone found a better solution? 

wyotim
Resident Rockstar
Resident Rockstar

@LaelH, I haven't found anything better than collecting the record in a variable and using it from there. I'm not sure how supported nested galleries are, so I'm not sure if MS is going to do much about it to be honest. While it's a little hack-y, I still manage to use this in most apps I build and it's been working okay for me. Personal mileage may vary of course!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (928)