cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jernejp
Helper IV
Helper IV

How to access nested table values

Hi,

 

I have a nested table as follows: 

added1.PNGadded2.PNG

 

What I'm trying to do is loop trough the table and get ACTIVITY values. How can I do that?

2 ACCEPTED SOLUTIONS

Accepted Solutions
PaulD1
Super User
Super User

One of the annoyances of the Collection view is that it does not distinguish between a nested table and a nested record, so I can't see from your screen shot if dll is a table or a record.

 

Assuming a record - the following should pull the dll associated with the first AddedActivity into a collection.

Collect(First(AddedActivity).dll)

 

If you want to return the Activity entry for the dll in the first AddedActivity row:

First(AddedActivity).dll.Activity

 

If dll is a table you would do (to get the first row from dll for the first AddActivity):

Collect(First(First(AddedActivity).dll))

First(First(AddedActivity).dll).Activity

 

If you just want to combine all the dll stuff together (and ignore the parent AddedActivity level) I think this would work:

ForAll(AddedActivity, Collect(colDll,AddedActivity.dll))

 

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @jernejp ,

Do you want to access the values within the dll column in your AddedActivity collection?

Have you solved your problem?

 

If you want to access the values within the dll column directly in your AddedActivity collection, please consider take a try with the following workaround:

Add a button control within your app, set the OnSelect property to following:

Clear(ActivityCollection);
ForAll(
           AddedActivity,
           Collect(
                     ActivityCollection,
                     dll
           )
)

then within your app, you could use the ActivityCollection as data souce to access your Activity records.

You could consider add a Gallery within your app, set the Items property to following:

ActivityCollection

then all Activity records would be displayed within the Gallery.

 

Please take a try with above solution, then check if the issue is solved.

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
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

4 REPLIES 4
jernejp
Helper IV
Helper IV

Solved it by using temporary collections to "extract" the data.

PaulD1
Super User
Super User

One of the annoyances of the Collection view is that it does not distinguish between a nested table and a nested record, so I can't see from your screen shot if dll is a table or a record.

 

Assuming a record - the following should pull the dll associated with the first AddedActivity into a collection.

Collect(First(AddedActivity).dll)

 

If you want to return the Activity entry for the dll in the first AddedActivity row:

First(AddedActivity).dll.Activity

 

If dll is a table you would do (to get the first row from dll for the first AddActivity):

Collect(First(First(AddedActivity).dll))

First(First(AddedActivity).dll).Activity

 

If you just want to combine all the dll stuff together (and ignore the parent AddedActivity level) I think this would work:

ForAll(AddedActivity, Collect(colDll,AddedActivity.dll))

 

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @jernejp ,

Do you want to access the values within the dll column in your AddedActivity collection?

Have you solved your problem?

 

If you want to access the values within the dll column directly in your AddedActivity collection, please consider take a try with the following workaround:

Add a button control within your app, set the OnSelect property to following:

Clear(ActivityCollection);
ForAll(
           AddedActivity,
           Collect(
                     ActivityCollection,
                     dll
           )
)

then within your app, you could use the ActivityCollection as data souce to access your Activity records.

You could consider add a Gallery within your app, set the Items property to following:

ActivityCollection

then all Activity records would be displayed within the Gallery.

 

Please take a try with above solution, then check if the issue is solved.

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
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

Awesome, thank you to both of you. I was using the dot in the wrong place. Thanks again!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,548)