Patch Gallery.Selected reverts to first item in List
I've tried not to post here again as I was content on completing this task independently. But after around 5-6~ hours on this 1 formula alone I've given up. (I also have purple links on the first 2 pages of google results of any posts similar to this)
To summarize: I have a gallery that takes data from a SharePoint list. The gallery contains around 20 items (customers). Each customer has 2 tasks associated to them daily: Unload and Load. The issue I'm dealing with is keeping track of who has done what in an 'Unloaded/Loaded by who' format. Keeping in mind if say an employee has to leave work early for whatever reason, they would have to pickup where the original employee left.
From what I've read about this 'bug' is that upon patching inside a Gallery.Selected, the data source is refreshed, and you're brought to first item on your list, due to a SortByColumn() formula in the Items of the gallery. I use 2 SortByColumn() formulas in my Item section and they're quite essential to the main menu, so a work around is required.
But I ran into problems with resetting the variable once the form is submitted and another is opened (the variable still says as the user's name despite them not interacting with the new customers form). As well as resetting the 'Unloaded by' if a user opens a customers form, makes a change, then realises they're at the wrong one and attempts to back out, yet they've already gone and patched the data.
Lastly, I've attempted having nothing patch immediately and having the submit entries button act as a final save and submit, but I run into issues with not all forms being patched in some mega formula or issues arising with the whole 'somebody has to take over halfway' problem.
So this is where I stand hahaha. Thanks for reading through this wall of text, I just wanted to ensure nobody wasted time by presenting an idea I've already tried. Any and all input is greatly appreciated. I'll be quite active on this forum for a while so let me know if anything needs any clarification.