cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Diamonddedo
Frequent Visitor

How to Trigger when component is loaded just like onVisible

Hi, Thanks for reading my question.

 

I'm building a component that checks if the user has the last version of the app, if true then it get them to the main screen, if false, it displays an error message.

 

I would like to know how to run the logic automatically.

 

 

 

If(cpn_loading_screen.varAppVersion = LookUp(cpn_loading_screen.Catalogue; Title = cpn_loading_screen.Title; VersionNumber);
Navigate(cpn_loading_screen.Home_Screen);Set(WrongVersion; true))

 

 

 

Here is the code I run to check wether the user uses the last version or not

 

How could I run this when the component is loaded on the page ? Juste like onVisible properties

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Diamonddedo
Frequent Visitor

I ended up using a Timer as a workaround, but I think it will only work in this case.

 

The objective was to load, wehther an error message or the home page, when you start the app. Since you won't use that screen except for that specific need, I used a Timer that repeated itself every 1 second that checks if my condition is true or false, and At the end of the Timer, the function is running, so it's kind of an "OnVisible" property.

 

Feel free to add any idea or info the this thread.

View solution in original post

1 REPLY 1
Diamonddedo
Frequent Visitor

I ended up using a Timer as a workaround, but I think it will only work in this case.

 

The objective was to load, wehther an error message or the home page, when you start the app. Since you won't use that screen except for that specific need, I used a Timer that repeated itself every 1 second that checks if my condition is true or false, and At the end of the Timer, the function is running, so it's kind of an "OnVisible" property.

 

Feel free to add any idea or info the this thread.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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