web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how to drill down and ...
Power Apps
Unanswered

how to drill down and display a collection with many layers

(0) ShareShare
ReportReport
Posted on by 257

I have a collection called Eval that starts with one table. entities

from there are nested table within nested tables.  and I'm having a hard time displaying the deepest layers in these tables. 

 

Collection name Eval. first table is entities

 

F_Quint_0-1621347944972.png

then multiple tables within other tables

F_Quint_2-1621348036431.png

 

 I'd like to display the data shown in the deepest level below along with the agent table 

 

F_Quint_3-1621348117566.png

 

 

 

 

Here's what I tried. 

 

I set the Items of the top level Gallery to my collection Eval. 

F_Quint_4-1621348387113.png

 

then on my nested Gallery, I set Items to ThisItem.entities.agent

F_Quint_5-1621349186095.png

 

however, this doesn't give me visibility to the deepest level which is entities.answers.questionGroupScores.questionScores

 

 

any ideas on how to display agent table with the nested levels shown above?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @F_Quint 

    The deepest you can nest with a Gallery is one level.  So, you will need to employ a second gallery with a nested gallery for it...in fact, for your level shown in your picture, you will need three primary galleries.

     

    So, first Gallery Items  : Eval  Nested gallery Items : ThisItem.entities.answers

    You will need to also employ a variable to capture the item of the nested gallery (as you cannot reference the nested gallery directly).  So, in the OnSelect : Set(answersData, ThisItem)

     

    Now, a second gallery with the Items property set to : answersData

    In that, a nested Gallery with the Items property set to : ThisItem.questionGroupScores

    The OnSelect action of that Gallery : Set(scores, ThisItem)

     

    Now a third gallery with the Items property set to:  scores.questionScores

     

    It's a long trail with that deep a level, but this would be how you can go about it.

     

    I hope this is helpful for you.

  • F_Quint Profile Picture
    257 on at

    hey @RandyHayes that's very helpful about storing info on a variable. But what I want to show on the first gallery is agents.  so how would I match each row of entities.agents to the deep levels of entities.answers.questionGroupScores.questionScores?

    F_Quint_0-1621352832561.png

    F_Quint_1-1621352851035.png

     

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @F_Quint 

    Well according to your picture, there is no direct relationship between the table in answers and the table in agents.

    So, in order to traverse to the questionScores, your path is starting at the answers column, not the agents column...that is a different path.

    So, if you can explain the relationship between the table records in agents to the table records in answers, then perhaps I can provide more options.

  • F_Quint Profile Picture
    257 on at

    @RandyHayes  thanks Randy. 

     

    let me give a little context on the data. 

     

    This is an evaluation form generated by evaluator. So there will be multiple agents.

    The Agent column/table contains an id and an API uri to the agent profile.

    F_Quint_1-1621357287033.png

     

     

    But what I'm interested is in getting the questionId and score shown below for each agent. 

     

     

    F_Quint_2-1621357311115.png

     

     

    This is been a challenge and I really appreciate your help.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @F_Quint 

    But here is the scenario...you have a table of agents and a table of answers.  You are trying to get something from out of the answers in relation to the agent, but there is not direct relation that I can see.

     

    It's like you have a bag of nuts and a box of chocolates.  You want to be able to select a nut from the bag and then the chocolates that contain that nut.   How would you know the connection?  What relates the chocolate to the nut?

     

  • F_Quint Profile Picture
    257 on at

    @RandyHayes 

    so each of the rows in collection shown below have an agent id(nested in the agent table), and for each row in this collection there are deeply nested questionids and scores. That's how they're related.  In order words, if you select a specific row in the collection and click on the agent table, and then drill down to the question id and score they would related. 

     

    Each agent was evaluated and scored on 10 questions.  the score number and question Id for each of each agent id is what I'm trying to get. 

    F_Quint_0-1621359951448.png

     

    I saw a related question where someone suggested saving each table values under a variable, but I'm not sure how to go about this. 

     

     

    Set(EvaluationAgent1Var, First(Eval).entities.agent);
    Set(EvaluationAgent2Var, Last(FirstN(Eval, 2)).entities.agent);
    Set(EvaluationAnswer1Var, First(Eval).entities.answers);
    Set(EvaluationAnswer2Var, Last(FirstN(Eval, 2)).entities.answers)

     

     

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @F_Quint 

    Yeah, don't waste your time with variables for this!

     

    Let me ensure that I completely understand the relationship...you are stating that the Agent table column will have (for example) 10 rows for 10 agents and that the answers will also have 10 rows where row 1 is related to row 1 of the agent table and row 2 of the answers would be related to row 2 of the agents.

    Is that the relationship, simply sequential?

     

  • F_Quint Profile Picture
    257 on at

    thank you for your patience @RandyHayes . I think I didn't explain it well. 

     

    what my app does is retrieve all the evaluations of agents completed by an evaluator. 

     

    In this case, my Eval collection has 6 evaluations

     

    here's how the JSON (in tree view) looks like as it comes in from an automated flow.

    Each of of numbers under entities is an evaluation that was completed. Each evaluation has an agent id, and score for each questionid as shown in expanded view of one of the 6 evaluations completed. 

     

    F_Quint_1-1621365435815.png

    F_Quint_2-1621366158399.png

     

     

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @F_Quint 

    No problem on the patience - we'll get there!

    So as I see that JSON, you have only one Agent.  So, my impression was, based on your first post, that you have multiple agents.

    Can you clarify that it is only one?

  • F_Quint Profile Picture
    257 on at

    hi @RandyHayes 

     

    yes it's only one agent per evaluation.

     

    In the JSON above there are 6 evaluations completed by this evaluator 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard