cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver I
Resolver I

Issues with global object, and multiple screens depending on the Data Object

Hi guys

 

Say we have main Screen, that loads a record from a database , and stores it in a global Vaiable (recMyClient). 

We have 5 screens all depending on this Global Variable that use Data cards. 

 

We run in Monitor, and When we want to go to screen 1, We load the recMyClient, and go to that screen. 

To our surprise, Monitor is also reporting, that Screen2, 3, 4 and 5 are updating their Data cards, Even though the user might never go to these screens. 

This is causing some performance issues, and we are surprised, why screens that are not displayed, are being refreshed... etc. 

 

Any insight?

Thanks

Fadi

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @eka24 

Thanks for your reply, we understand the difference between global, local...etc. 

The issue we just realized, that the difference between running the monito from the Studio, vs from a published app.

Dah... Running form Studio, where all the screens are loaded, will have the mentioned effect, just a side effect of the Studio, Vs Published apps which are behaving as expected. 

 

View solution in original post

2 REPLIES 2
Super User III
Super User III

My understanding of the issue stated is that you have used the Global variable in all the screens. If you used Set function in coding the variable, then that is how is supposed to behave because it's global and therefore whether you are on the screen or not. 

 

If you want the variable to perform only when you move to that screen, then use UpdateContext in setting that variable for each screen. 

That way, the variable starts only when you are on that screen.

 

You may state the formula for the variable if the explanation is not clear enough.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 

Thanks for your reply, we understand the difference between global, local...etc. 

The issue we just realized, that the difference between running the monito from the Studio, vs from a published app.

Dah... Running form Studio, where all the screens are loaded, will have the mentioned effect, just a side effect of the Studio, Vs Published apps which are behaving as expected. 

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (73,279)