cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Looking for ideas on a workaround for the nested gallery limit workaround

There may well not be a solution, but I'm looking for ideas if anyone has any... I am looking to improve this report view and what I really need is 3 levels of nested galleries which is not permitted.  (I have voted for the existing idea someone submitted for this).  Here is the current report which uses 2 nested galleries:

Report sample.jpg

 

Notice that the project name (Test Project 1) is being repeated for each milestone.  What I REALLY want is to show the project name once, followed by a list of all the milestones for that project, then the next project name (not shown here), followed by its milestones like this...

Report sample 2.jpg

To do that I need to next one more level of gallery which can't be done today.  I explored using a data table for the intermost level but it automatically gets added to the 1st gallery, not the second, no matter what I do.  

 

I suspect this might be the best I can do but if anyone has any bright ideas, I'm all ears.

Thanks,

LRVinNC

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

@LRVinNC 

Finally got a chance to review it again...Yes, I was correct, there were a lot of "rush this together" moments in there.

The issue was, that if you added any other projects to departments, things got a little wacky. 

 

So, attached is a new version of the same.  The formula in the OnStart is quite different and this time it accounts for all the levels, all the projects and the grouping/association of each.  As well, it adds sorting at all levels.

I added some more test data in the sample collection.  More importantly, that I added items somewhat randomly in the data to ensure that grouping of projects and departments along with the proper milestones would occur...it does.

 

Take a look over it and let me know what you think or if you have any questions.

I think there could still be some refactoring that would help, but only had a little time to look it over.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

14 REPLIES 14
Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

Hi @LRVinNC 

Can you share a little more about the formulas you have for your Galleries?  and, maybe a little about the structure of the source data?

I believe I have a few ideas for you, but I don't want to go down a road and give you some that are far from what you are actually experiencing. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

Data for this particular report is coming from a single SP list which contains Department, Project and Milestone detail.  However, in order to group the data appropriately, I use a GroupBy and Add Columns to create the Depts temp table.  Report is "accordian-style" and loads with only the departments visible.  Clicking a department reveals the detail below it.

Report sample3.jpg

Gallery1 has Items as follows:
SortByColumns(
GroupBy(
Filter(
AddColumns(
Milestones,
"tmpDept",
DepartmentName.Value,
"tmpProject",
ProjectName.Value
),
(CurrentPlanDate < Today()) && (RYGStatus.Value <> "Completed" && RYGStatus.Value <> "Closed" && RYGStatus.Value <> "On Hold") || RYGStatus.Value = "Not Specified"
),
"tmpDept",
"Depts"
),
"tmpDept"
)

 

tmpDept is what is being displayed.

 

Gallery2 is simply ThisItem.Depts (Depts being the temp table created via the AddColumns above)

Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

@LRVinNC 

I'll take a look over it and give you some ideas.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

@LRVinNC 

So, this is a realy crude mockup, but I believe it might be something of interest.

In the attached sample app, I am using a ListView as the 3rd Gallery.  So, there is One outer Gallery for Departments, and Inner (2nd) Gallery for the Project and a Listbox for the Milestones.

 

It should really have a felxible height gallery rather than a fixed height, but I was just throwing it together. 

Key ingredients:

   Gallery 1 - Items is the first groupby

   GalleryInner - Items is the second group by

   ListBox - Items is the Milestones (created by the Inner groupby)

 

I only focused on the selections of the Listbox items (Milestones) instead of the Projects or Departments.

 

See if this is something you can use...or if you want a better idea...lol

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

Thanks for this - I will play with this and let you know if it does the trick.  I have multiple fields to display per detail line so I would have to use multiple ListBoxes but in theory that shouldn't be a problem.  This was kind of where I was trying to go by using the data table but hadn't considered a series of listboxes as a substitute when that failed.  Again thanks.  

Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

@RandyHayes  With a single box for the milestone, no problem.  But when I tried to add list boxes for Owner (a person) field, and Status (a choice field), I could not make the list box happy.  So next I tried seeing if I could concatenate all 4 fields, padded with spaces to separate, into a new column (PrintRow) in my AddColumns so there was only one value to send to the listbox, but I couldn't make Concatenate happy either.  Off tomorrow, but I will continue to play with it next week.  

Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

@LRVinNC 

I had a couple more ideas on it since I posted.  I've not had any spare time to put them into practice yet.  I'll try to squeeze something in over the next couple days.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

@LRVinNC

Okay...I almost felt like I would not be able to sleep until I thought this through...

 

See the attached App.

Multi-level grouped data - 1 gallery, no sub galleries.

 

Let me know what you think.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Super User
Super User

Re: Looking for ideas on a workaround for the nested gallery limit workaround

{Mouth hanging open...}   Now THAT'S creative.  Pretty much blew me away on a Monday morning. 

Help me understand how this part works.  

 

Collect(multiList,
{DataLevel:1,
Seq:CountRows(Filter(multiList, Department=Department && DataLevel=1))+1,
Department:Department});

 

Since you are just building your collection with the Collect here, how can you simutaneously create the collection filter the same collection?

 

Also, I note that you run 2 ForAll loops -- one covering department and project and a separate on for milestones... what's the rationale for them not being either all separate or all together?

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,124)