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

State Persistence With Global Variables/Collections

I have a question concerning how global variables work within power apps: If a global variable is defined, or altered, in one session of using the application and then the application is closed, will that global variable stay the same for the next session or user that accesses the app? For example, I have a rudimentary permissions feature in my app. If I were to add John, Joe and Josh to a collection called "Admins" during one session of using the app and then restart the application, would the same people still be in that collection? I'm running into an issue right now where my power app seems to be emptying the collection every time I try to restart program but I'd like it to stay the same even after I leave the app. As of right now I'm not sure if there is an issue with instantiating/altering the collection or if I just need to make another table in dataverse that can be edited for permissions across the app.  

1 ACCEPTED SOLUTION

Accepted Solutions
metsshan
Solution Sage
Solution Sage

Any data stored with Set(), UpdateContext() or Collect() are all in client memory of the active session, cannot be accessed by another user's session, and will be destroyed when the session ends.

 

Yes, you will need a new table in your data source for managing custom permissions, or use a connector like Office 365 Groups to manage role based access by AD group membership.

View solution in original post

1 REPLY 1
metsshan
Solution Sage
Solution Sage

Any data stored with Set(), UpdateContext() or Collect() are all in client memory of the active session, cannot be accessed by another user's session, and will be destroyed when the session ends.

 

Yes, you will need a new table in your data source for managing custom permissions, or use a connector like Office 365 Groups to manage role based access by AD group membership.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,327)