cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

[Question] PowerApps Components - How to Refresh Data Sources and Do Custom Action in Buttons (OnSelect)

Hello community,

 

I have been using the components all over my Power Apps, but there are two things that am unable to do:

  1. How can I add a Refresh Button inside a component, that will refresh the desired Data Source (Tables and Records inputs are not properly refreshing my Data Source)
  2. How can I make a button inside a component that I can customize its action from outside the component, like, I created a component that will prompt the user Yes/No buttons, I want want for example to Patch a Data Source, and I want No to hide the prompt, but in another app, I want it to Patch something else. Can I customize what is the OnSelect of a button? Let me rephrase the question, how can I do actions based on the component outputs, for example, if they choose this button, how can I Patch this particular data source on the app?
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: [Question] PowerApps Components - How to Refresh Data Sources and Do Custom Action in Buttons (OnSelect)

Never matter, I found the solution.

 

You just need to put an Output that is Boolean, and make the button inside the Component create "true" for that Output, and put OnReset to make it "false" for that Output.

 

Now on the app side, create a Toggle, and make the default that Output value, and put all of your code inside the OnCheck, at the end of it, put Reset(Component).

View solution in original post

1 REPLY 1
Highlighted
Resolver I
Resolver I

Re: [Question] PowerApps Components - How to Refresh Data Sources and Do Custom Action in Buttons (OnSelect)

Never matter, I found the solution.

 

You just need to put an Output that is Boolean, and make the button inside the Component create "true" for that Output, and put OnReset to make it "false" for that Output.

 

Now on the app side, create a Toggle, and make the default that Output value, and put all of your code inside the OnCheck, at the end of it, put Reset(Component).

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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