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
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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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 (4,415)