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 / 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,251 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

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 380 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 340

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard