We have a canvas app that displays a gallery representing site visits where each site visit has its own unique ID. What we would like to do is when one creates a new site visit in the AddEditScreen is:
- Update the SiteVisitsGallery with the new or updated site visits (done)
- Navigate the user to the OverviewScreen with contains the updated SiteVisitsGallery (done)
- Open the DetailsScreen by selecting the correct gallery item based on the site visit unique ID
Step 3 is a bit of pain because we can't figure out the correct row number in the gallery to use this code, which essentially does what we want it to do if we hardcode a row number:
Select(SiteVisitsGallery, UnknownRowNumber, SelectiItemRectangle);
The row number could be added to the collection but "ForAll" is not sequential so that's not an option.
The other approach we tried is selecting the correct site visit in the SiteVisitsGallery which works fine and we can see the correct row being selected:
// SiteVisitsGallery
Default = varSelectedSiteVisitRow
OnSelect = Select(SelectiItemRectangle)
// button.OnSelect:
Reset(SiteVisitsGallery);
Set(varSelectedSiteVisitRow, LookUp(colSiteVisits, SiteVisit.ID = 11));
We got this far but for the life of me I can't figure out how to do the actual click on the selected row in the gallery. The color indicates the row is correctly selected but we don't know how to invoke the "SiteVisitsGallery.OnSelect" for the selected item programmatically.
Any tips or help would be welcomed, thank you.