I am building a Student Information System for a special education Summer school.
The system is a Model Driven app, and I built a student attendance screen as a Canvas app "custom page". It's pretty spiffy.
So I have two collections, each pulling from a Dataverse table: "studentList" and "attendanceData". Each student has 18 "attendance" records, one for each attendance day of Summer school. Each attendance record has a Choice field.
To represent this data, I set up a vertical Gallery called StudentGallery, and inside of that Gallery I created a horizontal Gallery called AttendanceGallery, which shows only related attendance records for that student.
It works a treat! Except that it's slow. I understand why: PowerApps wasn't really designed to multiply a Gallery object x 200+. It works fine when the user filters the list by classroom. But when all students are loaded, it chugs: on first appearance, when sorting, searching, and filtering.
Does anyone have insights about how I can increase performance? Some thoughts I've had:
- Maybe I can AddColumns() to the studentList collection and populate them with the attendance data, so that I could have just one gallery instead of two.
- BUT AddColumns() only works with static column names, so they couldn't be named after the dates.
- I could name them simply: "1" "2" "3" up to 30 (since we would never have more attendance days than that)
- But if I did this, how would I patch each column with its appropriate attendance record?
- I assume it'll be something like ForAll(studentList,ForAll(attendanceData,Patch()))
- But for each attendance record loop, I need to patch a *different* column, i.e., first loop, patch column "1", then patch column "2", then patch column "3". Can I set a integer variable, increment it, and use it as the column name to patch? I doubt this.

Report
All responses (
Answers (