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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multiple Actions in On...
Power Apps
Answered

Multiple Actions in OnSelect Button not working

(0) ShareShare
ReportReport
Posted on by 3
I need to perform two or more actions when I click a button created in a canvas app.
Various guides indicate to separate the actions with the ; character.
 
I tried recreating the examples in the guides (https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/controls/control-button)
 
 
Set the Add's OnSelect property to this formula:
UpdateContext({Total:Total + Value(Source.Text)});
UpdateContext({ClearInput: ""})
 
Note
Separate multiple formulas with a semicolon ";".
 
But when I set the actions in the OnSelect property, the application returns an error "unexpected characters. The characters in the formula are used unexpectedly."
Another article states that with the advent of Power fx functions, when using multiple actions, you no longer need to use the ; character as a separator, but you must use the , character or a line break (\n).
Unfortunately, in this case too, the application returns an error and prevents you from proceeding.
Can anyone offer some guidance?
Categories:
I have the same question (0)
  • Suggested answer
    MParikh Profile Picture
    480 Super User 2026 Season 1 on at

    Try any of the below option.

    ✅ Option 1 – Use ; (common in en-US locale)

    UpdateContext({Total: Total + Value(Source.Text)}); UpdateContext({ClearInput: ""})
    ✅ Option 2 – Use , (common in EU locales)
    UpdateContext({Total: Total + Value(Source.Text)}), UpdateContext({ClearInput: ""})
    ✅ Option 3 – Use line breaks
    ​​​​​​​UpdateContext({Total: Total + Value(Source.Text)})
    UpdateContext({ClearInput: ""})
     
  • Verified answer
    WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at
    I suspect you are using European syntax where (you need to get accustomed to this in all of your coding) you use a semi-colon ; instead of a comma , and two semi-colons ;; instead of a single ;
    So in your case the two options would be
    UpdateContext({Total: Total + Value(Source.Text)});;
    UpdateContext({ClearInput: ""})
    or in the case of UpdateContext, you can do two in the one statement
    UpdateContext(
       {
          Total: Total + Value(Source.Text);
          ClearInput: ""
       }
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    Visit my blog Practical Power Apps    LinkedIn   

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard