I have a single page app that has a gallery on it and a view form.
I'm trying to get the first record of the gallery selected when the app loads AND have the View Form show that record's data.
The Gallery's OnSelect is
Set(varThisCase,LookUp('Test List',Title=ThisItem.Title))
(Title is my unique field)
The ViewForm's item property is varThisCase
In the screen's OnVisible, All that's in there is Select(Gallery1,1).
Here's what's happening:
When the app starts, I get an error that says "Row or column passed to the Select function is outside the bounds of the gallery items"
If I ignore the error and select a record in the gallery, it shows me the record in the Viewform.
I put in an additional test page with 1 button on it that clears the varThisCase variable and Navigates back to the main page. When that navigation happens, I don't get that same issue with the Row or column passed being outside the bounds of the gallery items, the first record gets selected (as expected) and the record is shown in the viewform.
It appears that the gallery bounds issue only happens when the app is first launched.
What possible workarounds do I have here to:
- Select the first record in the gallery on app start
- Show the record's information in the View Form (again, on app start)
I've looked at several different ways of selecting that first record (including setting the Gallery's Default to First(Gallery1.AllItems). Nothing seems to work. 😞

Report
All responses (
Answers (