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