cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sababneh 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
Sababneh 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
Sababneh 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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (7,883)