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:
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...
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
Solved! Go to Solution.
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.
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.
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.
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)
I'll take a look over it and give you some ideas.
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
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.
@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.
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.
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.
{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?
User | Count |
---|---|
228 | |
103 | |
98 | |
57 | |
31 |
User | Count |
---|---|
283 | |
113 | |
107 | |
63 | |
63 |