cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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

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
Helper IV
Helper IV

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

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

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
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 (12,821)