Showing results for 
Search instead for 
Did you mean: 
mr-dang Community Champion
Community Champion

Re: Global Variable works on Desktop but not on Phone

@Anorakman wrote:


Anyone got any thoughts on how to work around this problem until it is fixed?  If it is fixed?


Hi Anorakman,

Thank you for providing steps for replication. That helped a lot and gave me a good sense of how and why you were encountering this issue. @KroonOfficeSol, I appreciate that you stepped up and offered help.


I was able to replicate the issue on iOS and I have two comments:

  1. This can be solved with best practices. When working within a Gallery, I set the global variable to ThisItem instead of Gallery.Selected. ThisItem is designed for citing child content whereas Gallery.Selected is for referencing the gallery from controls outside the gallery. 
  2. It appears like the action is being activated before the row in the gallery is considered "selected." This explains how the variable seems to be behind by one step. It does not register the selection until after the actions are performed.

Let me know if that helps.


Mr. Dang



Microsoft Employee
KroonOfficeSol Resident Rockstar
Resident Rockstar

Re: Global Variable works on Desktop but not on Phone

He Mr Dang,


This is indead a nice improvement and a better way to fill the Global variable, nice. But wouldn't still the Gallery be filtered on screen entry or is this update preformed before the screen to become visible? How does PowerApps handles this in the background?



Anorakman Advocate III
Advocate III

Re: Global Variable works on Desktop but not on Phone

Many thanks.  Using the ThisItem reference works.  Clearly the Gallery.Selected value is updated after the action to Set the global variable is completed.


Only question is why this behaviour is inconsistent between iOS and pc browser.

Helpful resources

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.


New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (7,159)