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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,749)