cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Mahipal
Level: Powered On

How to stop onvisible in power apps

Hi all,

 

i have following scenario.

 

i have list screen with  list of items in gallery control and navigating to detials screen of each item, but when came back from detail screen to list screen, onvisible event of list screen is firing and code under this is excuting but i dont want to excute that onvisible code of list screen, please sugest me how to solve this problem.

 

Thanks,

Mahipal

1 ACCEPTED SOLUTION

Accepted Solutions
mr-dang
Level 10

Re: How to stop onvisible in power apps

Place a condition around your actions in OnVisible.

 

If I only want it to fire upon opening the app, I use a context variable:

 

If(!loadapp,
[actions go here];
UpdateContext({loadapp: true})
)

This means, "As long as loadapp is not true (so it can be false or empty), perform the OnVisible actions and then set the loadapp variable to true so it doesn't trigger anymore."

Microsoft Employee
@8bitclassroom
3 REPLIES 3
Super User
Super User

Re: How to stop onvisible in power apps

Hey @Mahipal

 

 

Just put your code into the OnHidden?

Or just remove the code in OnVisible.

And what exactly are you doing in the OnVisible of your list screen?

 

Hope this helps

 

Kind regards

 

 

Tom





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





mr-dang
Level 10

Re: How to stop onvisible in power apps

Place a condition around your actions in OnVisible.

 

If I only want it to fire upon opening the app, I use a context variable:

 

If(!loadapp,
[actions go here];
UpdateContext({loadapp: true})
)

This means, "As long as loadapp is not true (so it can be false or empty), perform the OnVisible actions and then set the loadapp variable to true so it doesn't trigger anymore."

Microsoft Employee
@8bitclassroom
eopara
Level: Powered On

Re: How to stop onvisible in power apps

Thanks for this piece of art... Saves me the trouble of loading and saving data all the time when the onVisible action...

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 214 members 4,312 guests
Please welcome our newest community members: