I have several screens and they will all have this icon in the gallery

I have this code on the ICON
Set(glbSelectedRecordID, ThisItem.ID);
Select(Parent);
FormMode.View;
Navigate('Substation Screen')
When you click on this icon from any of the galleries it navigates to the account screen using the id of the record selected.

I have this code on ITEM in the form
LookUp(Substations, ID=glbSelectedRecordID)
The issue is that it is not working consistently, additionally I need to have the list in the gallery beside the account information also select that location as well, it has the same code on the arrow.
How can I make this work no matter what page or from the accounts page fill in the form?