Welcome, Matt! You've actually provided a good description of the problem, so no worries there.
Since your Gallery and Form are pointing to the same data source, I'd recommend simplifying the pattern. Instead of storing the ID and then performing another LookUp, try binding the form directly to the selected gallery record:
Gallery OnSelect
Set(varRecord, ThisItem)
Form Item
varRecord
Or even:
Gallery1.Selected
Using the actual record is generally more reliable than storing the ID and re-querying the data source.
Also, if you're using Set(varID, ThisItem.ID), double-check that the form is being refreshed when the variable changes. Sometimes forms can retain their current record until a ResetForm() or a change in the Item property triggers a refresh.
A few troubleshooting questions:
- Is the form in the same screen as the gallery?
- Are you using Gallery.Selected anywhere else?
- Does the issue happen more often after editing/saving records?
- Is the form displaying stale data, or does it remain completely unchanged?
My suspicion is that the issue isn't the LookUp itself. With a small SharePoint list, that should return almost instantly. It's more likely that the form's Item property isn't consistently reevaluating, or there's another formula overriding the selected record.
As a quick test, add a label with:
varID
and another with:
LookUp(ESD_Status, ID = varID).Title
If those update correctly while the form doesn't, you've narrowed the problem to the form rather than the variable or lookup.
I'd start by replacing the ID-based lookup with the selected record itself. That's the pattern most makers use for a Gallery → Form scenario and tends to eliminate these intermittent refresh issues.
Thanks & Regards,
Manoj Annavajjala