cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Run action from within component when component becomes visible

I want to run an action when an component appears from within the component similar to the OnVisible of screens. 

I know I can us the OnReset, but I want a solution from within the component so that everyone can just drop in the component without needing to do other things. 

 

My current but not so elegant solution is to use an OnStart of a timer with AutoStart which is placed outside the visible area. 

 

 

3 REPLIES 3
Nogueira1306
Super User
Super User

You have a function called Reset()

You can try that

 

https://docs.microsoft.com/en-US/powerapps/maker/canvas-apps/functions/function-reset

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

Anonymous
Not applicable

Maybe more info is in order. I want to run a behavioural function in the component not outside (e.g. not screen OnVisible = Reset(Component)). 

A component internally doesn't seem to have something other then OnReset that I know of. However, a component cannot reset itself without another behavioural function, which is what I need in the first place. 

 

The only behavioural function that starts automatically in an component internally (that I've found) is a timer, but that sounds like bad practice to get an automatic behavioural function.

Anonymous
Not applicable

I was testing things, and it seems that using reset(parent) or reset(ComponentName) does not work when the component is imported from the component library. 

It does work on the screens of the component library where you can test things out. 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,685)