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:
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-123456789 | AlphaRotationEnd: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

Report
All responses (
Answers (