web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Two Functions in Button
Power Apps
Unanswered

Two Functions in Button

(2) ShareShare
ReportReport
Posted on by

I'm having trouble adding two functions to the same button, "SubmitForm(EditForm1)" and "Navigate(Screen 2)".  Both functions work perfectly when called separately, but I can't seem to get them to work together.

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @GabrielJardimRp,

     

    What specific error are you receiving? When working with a Form control it is recommended to write your code, that only needs to run after a successfull submission, within the Form's OnSuccess property instead of chaining them in the Submit Button's OnSelect.

     

    //Button OnSelect
    SubmitForm(EditForm1)
    
    //Form OnSuccess
    //Note: screen names with a space should be enclosed in single quotes
    //Without a space this is not required: Navigate(Screen2)
    Navigate('Screen 2')

     

    To combine functions, you can use the chaining operator - which is dependent on your language decimal operator:

    //Language with a comma decimal separator
    Function1();; Function2()
    
    //Language with a dot decimal separator
    Function1(); Function2()

     


    If this solves your question, would you be so kind as to accept it as a solution✔️

    If you liked my solution, please give it a thumbs up👍

     

    Connect with me: LinkedIn | Blog

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard