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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Nested Gallery Scrolli...
Power Apps
Unanswered

Nested Gallery Scrolling - GroupBy?

(0) ShareShare
ReportReport
Posted on by 122

Hey all,

 

Hoping someone could point me in the direction of how to do this, but I have a nested gallery with multiple records and I want all instances of that nested gallery, to scroll at the same time and in the same place. I know this isn't 'officially' supported. In a test gallery that I've since retired and using as my example, I was doing this using multiple calls doing calls to my SP datasource using lookup without a nested gallery. However and understandably, it was never scalable and was quite unstable, buggy and slow. I have since 'upgraded' it into a parent and nested gallery. Here is the appropriate items properties (varSequenceValue is set to 8). 

 

Parent Gallery: 

ForAll(
 Sequence(
 varSequenceValue,
 0
 ),
 Value * 7
)

 

Nested Gallery:

With(
 {
 wDepartmentRosters: Coalesce(
 LookUp(
 colDepartments,
 Title = varSelectedDepartment
 ).Roster,
 Char(32)
 ),
 wRecords: SortByColumns(
 Filter(
 colUserRotationJSON,
 !IsBlank(Value)
 ),
 "Key"
 )
 },
 Filter(
 Ungroup(
 ForAll(
 Split(
 wDepartmentRosters,
 Char(44)
 ) As aRosters,
 ForAll(
 wRecords As aRecord,
 If(
 aRosters.Value in aRecord.Value,
 {
 Title: aRecord.Key,
 Value: Concatenate(aRecord.Value & Char(124))
 }
 )
 )
 ),
 "Value"
 ),
 Text(
 DateAdd(
 DateValue(First(galWeekdays_1.AllItems).weekStarting),
 ThisItem.Value - 1,
 TimeUnit.Days
 ),
 "yyyy-mm-dd"
 ) in Value
 )
)

 

What it looks like with names blurred as I pull those AzureIDs and do a Office365 lookup:

MGeale_0-1686891537546.png

 

The data for the nested gallery is a JSON string (colUserRotationJSON) with the appropriate rosters and the AzureID of the associated user; Key (azureID) and Value (JSON string). Example data:

Key (azure)Value (JSON String)
XYZ-123456789AlphaRotationEnd:2023-06-18T22:30:00.000Z|AlphaRotationRoster:SAP BI 2nd|AlphaRotationStart:2023-06-11T22:30:00.000Z|BravoRotationEnd:2023-06-25T22:30:00.000Z|BravoRotationRoster:SAP BI 2nd|BravoRotationStart:2023-06-18T22:30:00.000Z|CharlieRotationEnd:2023-07-02T22:30:00.000Z|CharlieRotationRoster:SAP BI 2nd|CharlieRotationStart:2023-06-25T22:30:00.000Z|DeltaRotationEnd:2023-07-09T22:30:00.000Z|DeltaRotationRoster:SAP BI 2nd|DeltaRotationStart:2023-07-02T22:30:00.000Z

 

I have read that Nested galleries are kind of going out of fashion as they add a lot of unnecessary overhead with GroupBy kind of becoming more popular and it might give me the desired result I'm after. Only downside, I'm not 100% sure how to modify my code to do that since both code blocks are in the items property and any time I try and modify, it falls over. 

 

Only thing I've read about galleries and being able to scroll them uniformly is if you're doing them at a 'parent' level and not at a 'nested' level using scrollable screens... I've used this method before and normally works well, but I couldn't replicate it this time around because of how the thing is currently built.

 

If anyone could provide any sort of insight, it would be hugely appreicated.

 

Thanks in advance!

 

Cheers

Categories:

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard