cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
R3dKap
Super User
Super User

How to trigger OnSave event "manually"

I have customized a SharePoint form using PowerApps and I have a huge formula in the OnSave event of the SharePointIntegration control.

Inside the form I put a "SAVE" button on which I wish to trigger the OnSave event, instead of duplicating the formula.

Anyone knows how to do that ?

1 ACCEPTED SOLUTION

Accepted Solutions
wyotim
Resident Rockstar
Resident Rockstar

What about having a button (either hidden or if possible your manual Save button) with the code you want to trigger/not duplicate and then in the OnSave code have a Select(buttonName) call that runs that code?

View solution in original post

5 REPLIES 5
v-xida-msft
Community Support
Community Support

Hi @R3dKap,

Could you please share a bit more about your scenario?

Do you want to trigger the OnSave Event of SharePointIntegration control from another button without using duplicated formula?

I have made a test on my side, if you want to trigger the OnSave Event of SharePointIntegration control from another button without using duplicated formula, I afraid that there is no way to achieve your needs in PowerApps currently.

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
wyotim
Resident Rockstar
Resident Rockstar

What about having a button (either hidden or if possible your manual Save button) with the code you want to trigger/not duplicate and then in the OnSave code have a Select(buttonName) call that runs that code?
samuelJ
Responsive Resident
Responsive Resident

like the other user said there is no way to trigger the OnSave() property.

If you have a huge formula you want to use a few times, you could create a button, set its visiblity to false, and whenever you want to execute this code execute "Select(nameOfMyButton)". 

 

Until PowerApps adds the ability to add functions/methods, i believe this to be a workaround.  

samuelJ
Responsive Resident
Responsive Resident

@wyotimoops, didnt read your solution before posting.

wyotim
Resident Rockstar
Resident Rockstar

@samuelJ No worries! Great minds think alike! Smiley Happy And your response was more detailed too.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (3,123)