Skip to main content
Community site session details

Community site session details

Session Id : L4CXUBqe05Nvw7LOyrAYsE
Power Apps - Building Power Apps
Answered

Onselect executing multiple commands

Like (0) ShareShare
ReportReport
Posted on 27 Oct 2023 07:56:00 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:
  • Addieeg Profile Picture
    8 on 27 Oct 2023 at 09:43:37
    Re: Onselect executing multiple commands

    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...

  • Verified answer
    iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on 27 Oct 2023 at 08:02:49
    Re: Onselect executing multiple commands

    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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading complete