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 / How to retrieve values...
Power Apps
Answered

How to retrieve values from the collection and set to a variable?

(0) ShareShare
ReportReport
Posted on by 70

Dear all, 

I have a requirement to read combo box multiselected values and save them to a text box and the values are separated by a comma (,). Please advise how shall I achieve this? Thank you for your help and support.

My Approach - 

I tried to store the combo box selected values into a collection object like below -

Collect(Prodcollection, Comb0BxProducts.SelectedItems);

On select combo box event, I want to read all all the combo box selected values from the collection and set to a new variable with values separated by comma (,). This variable I will assign to a text box default property.

My question is how to read the values from collection and separate them with comma(,) and set to a a new variable?

Categories:
I have the same question (0)
  • Verified answer
    One Profile Picture
    416 on at

    if you want to use the values from the combobox directly you can try the following:

    Concat(YourComboboxName.SelectedItems, yourColumnName, ",")

    ------------------------------------------------------------------------------------------------------------------------------
    Please click "Accept as Solution" if this post answered your question so that it is helpful for people having similar questions. If you found this post helpful smack that Thumbs up button! Thanks!

  • narayanareddy_g Profile Picture
    70 on at

    Hi,

    I do not want to concatenate two fields, but rather I want to have combo box selected values concatenated by a comma. For example, if combo box shows Product1 and Product 2 as selected values,

    then I want result as Product 1, Product 2 (the values Product 1 and Product 2 are to be separated by a comma)

  • Verified answer
    One Profile Picture
    416 on at

    @narayanareddy_g ,

    that statement doesn't concat 2 fields. column name is meant to be the column you are using in your combobox to retrieve values. it just concats the values selected in your combobox with a "," delimiter 

    ------------------------------------------------------------------------------------------------------------------------------
    Please click "Accept as Solution" if this post answered your question so that it is helpful for people having similar questions. If you found this post helpful smack that Thumbs up button! Thanks!

  • narayanareddy_g Profile Picture
    70 on at

    Thank you so much, it is working perfectly now. I appreciate your help and support. Many Thanks again!

  • narayanareddy_g Profile Picture
    70 on at

    Though it works, it throws me an error as shown in the below screenshot. Please advise.

     

    narayanareddy_g_1-1655550061514.png

     

  • narayanareddy_g Profile Picture
    70 on at

    I am very sorry, please ignore this error message. This was due to some other control. I misunderstood. No issues with the solution provided by you. Thank you so much and my apologies. 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard