cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sababneh
Advocate IV
Advocate IV

[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
Advocate IV
Advocate IV

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
Advocate IV
Advocate IV

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

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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

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

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