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

how to drill down and display a collection with many layers

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?

12 REPLIES 12
RandyHayes
Super User
Super User

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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
Super User
Super User

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@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
Super User
Super User

@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?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@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
Super User
Super User

@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?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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
Super User
Super User

@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?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements

Celebrating the May Super User of the Month: Laurens Martens

  @LaurensM  is an exceptional contributor to the Power Platform Community. Super Users like Laurens inspire others through their example, encouragement, and active participation. We are excited to celebrated Laurens as our Super User of the Month for May 2024.   Consistent Engagement:  He consistently engages with the community by answering forum questions, sharing insights, and providing solutions. Laurens dedication helps other users find answers and overcome challenges.   Community Expertise: As a Super User, Laurens plays a crucial role in maintaining a knowledge sharing environment. Always ensuring a positive experience for everyone.   Leadership: He shares valuable insights on community growth, engagement, and future trends. Their contributions help shape the Power Platform Community.   Congratulations, Laurens Martens, for your outstanding work! Keep inspiring others and making a difference in the community!   Keep up the fantastic work!        

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!      

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Community Roundup: A Look Back at Our Last 10 Tuesday Tips

As we continue to grow and learn together, it's important to reflect on the valuable insights we've shared. For today's #TuesdayTip, we're excited to take a moment to look back at the last 10 tips we've shared in case you missed any or want to revisit them. Thanks for your incredible support for this series--we're so glad it was able to help so many of you navigate your community experience!   Getting Started in the Community An overview of everything you need to know about navigating the community on one page!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Ranks and YOU Have you ever wondered how your fellow community members ascend the ranks within our community? We explain everything about ranks and how to achieve points so you can climb up in the rankings! Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Powering Up Your Community Profile Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile. Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Blogs--A Great Place to Start There's so much you'll discover in the Community Blogs, and we hope you'll check them out today!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Unlocking Community Achievements and Earning Badges Across the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. Check out some details on Community badges--and find out more in the detailed link at the end of the article! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Blogging in the Community Interested in blogging? Everything you need to know on writing blogs in our four communities! Get started blogging across the Power Platform communities today! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Subscriptions & Notifications We don't want you to miss a thing in the community! Read all about how to subscribe to sections of our forums and how to setup your notifications! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Getting Started with Private Messages & Macros Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Community User Groups Learn everything about being part of, starting, or leading a User Group in the Power Platform Community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Update Your Community Profile Today! Keep your community profile up to date which is essential for staying connected and engaged with the community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Thank you for being an integral part of our journey.   Here's to many more Tuesday Tips as we pave the way for a brighter, more connected future! As always, watch the News & Announcements for the next set of tips, coming soon!

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Top Solution Authors
Top Kudoed Authors
Users online (5,756)