cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Display nested collection in gallery

Hello experts,

 

I have a nested JSON structure. i want to display "checklistByRole" all items to gallery.

 

Nested JSON.jpg

 

For that i have used below formula.
ClearCollect(checkList,ClearCollect(AllData,'PowerAppsbutton-2'.Run().data).checklistByRole) 

which give me "checkList" collection.

 

Test2.jpg

 

I have assign  "checkList"  collection to gallery, but it gives below error.

Test3.jpg

 

Means i can't display all properties of checklistByRole in gallery.

Any help is always appreciated!!

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @sachinsoni ,

Do you want to get all checklistByRole data from nested table?

Based on your pic, I assume that the original collection name is checkList.

Then try this formula:

Clear(all_checklistByRole);ForAll(checkList,Collect(all_checklistByRole,checklistByRole))

Then you will get all the  checklistByRole data from checkList collection in all_checklistByRole collection.

Here's a similar issue for your reference:

https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-access-nested-table-values/td-p/31382...

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Hi @sachinsoni 

The Groupby() function is useful for displaying nested data.  https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-groupby .  See if it helps with your issue. 

Highlighted

Hello @Drrickryp ,

I have tried group function, but i getting same error. 

Please suggest any other possible solutions.

Thanks.

Highlighted
Community Support
Community Support

Hi @sachinsoni ,

Do you want to get all checklistByRole data from nested table?

Based on your pic, I assume that the original collection name is checkList.

Then try this formula:

Clear(all_checklistByRole);ForAll(checkList,Collect(all_checklistByRole,checklistByRole))

Then you will get all the  checklistByRole data from checkList collection in all_checklistByRole collection.

Here's a similar issue for your reference:

https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-access-nested-table-values/td-p/31382...

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,657)