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 / Onselect executing mul...
Power Apps
Answered

Onselect executing multiple commands

(0) ShareShare
ReportReport
Posted on by 8

Hi,

 

I am very new to PowerApps and I have been struggling with an issue. I have tried reading forum posts and asking chatGTP, however I still run in to the same issue. I have written this code in the Onselect field for a button:

 

Collect(colProducts;{ Name: txt_itemName.Text; Price: txt_productPrice.Text})

 

I want the button to do several things at the same time when I press it, however I get an error message when I either try to use ";" or "," after the command I have already written to chain together multiple commands. The error message says it is an "unexpected sign". 

 

Some help is greatly appriciated. Thank you 🙂

Categories:
I have the same question (0)
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    ChatGPT is not a great source for Power Apps to be honest

     

    In your example, if your locale means that you use ; to separate parameters like in the code you provided, then you will use ;; to separate actions, like this:

    Collect(colProducts;{ Name: txt_itemName.Text; Price: txt_productPrice.Text});;
    Collect(colProducts;{ Name: txt_itemName2.Text; Price: txt_productPrice2.Text})

    if your code normally uses comma , to separate parameters, then you would use ; like this:

    Collect(colProducts,{ Name: txt_itemName.Text, Price: txt_productPrice.Text});
    Collect(colProducts,{ Name: txt_itemName2.Text, Price: txt_productPrice2.Text})

     

    Cheers,

    Sancho

  • Addieeg Profile Picture
    8 on at

    Wow thank you so much! The double semicolon worked. My professor only uses one semicolon and that worked for him, so that really confused me...

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard