This post is tangentially related to this one I made the other day.
Essentially, someone gave me a fix which I have worked with to make sure that reference numbers are never doubled up on, however, this fix relies on a gallery (TicketsArchiveGallery) to have the first item 'selected'. This gallery however is 'hidden' on a page of the app the user should never see - it's just there to help me reference the ID number for the new reference number, this means that where my reference number is worked out using the following formula:
If(TicketsArchiveGallery.Selected.IDStatic >= varID, TicketsArchiveGallery.Selected.IDStatic + 1, varID)
If I have not 'Selected' record in the gallery it still doubles up reference numbers in certain situations.
My gallery is filtered so it's descending by the IDStatic number:
SortByColumns('Tickets Archive', "IDStatic", Descending)
Is there any way to 'Select.Parent' of the top item in a gallery when another screen is OnVisible (or the app on-start, even)? Is there a better solution to this?
Thanks!