cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

ComboBox SelectedItems object to text

Hi all,

 

Sorry if this is a stupid question but i am struggling to find the documentation to turn the item in a combobox into text. It's set so that only one item can every be selected a time. 

 

How do i turn the output from an object to text so that i can use it in a table?

 

Collect(Info, 
 {
  Kit:KitValue,
  Workbook:Text(ComboBox3.SelectedItems), 
  Worksheet:Dropdown1.Selected.Value,
  Information:TextInput1.Text
}
);

It is the workbook line that doesn't work however i'm looking for a command to do that sort of thing.

 

Kind regards,

Colleen

13 REPLIES 13

Button 2 = Clear('List1') ; ForAll(ComboBox.SelectedItems,Collect('List1',{Column1:Var1.Text,Column2:Var2.Text,Column3:Var3.Text,Column4: Column2}))
________________________________
I changed Set1.Column2 to Column2
Please let me know 🙂

Frequent Visitor

Yess!! You beauty!!!!! Smiley Very Happy

 

That has furstrated me for a couple of days now! Can't thank you enought!!

 

Are you able to explain briefly why that made the difference?

 

Thanks again! Made a very happy end to my Thursday and whole week!!!!!

 

Ian

Hello Ian,

Perfect.. 🙂
So this is the expression..
Button 2 = Clear('List1') ; ForAll(ComboBox.SelectedItems,Collect('List1',{Column1:Var1.Text,Column2:Var2.Text,Column3:Var3.Text,Column4: Column2}))

The difference is that, by using Column4: Column2 you have access to the item. By using Column4: Set1.Column2 you reference the whole Column2 of the Set1 collection. Set1.Column2 is one column table. That's the reason that the Gallery that you had, displayed  [object object].

We use the ForAll function. So we iterate on every record. So, the moment that we are at the first record of the ComboBox.SelectedItems, ,Column4: Column2 is enough to specify the item that we need. 

                                                        ....                    Column2
Record 1 --->                                                                x


  Column4: Set1.Column2 returns the whole Column2 for every record of the ComboBox.SelectedItems.

I hope this helps. You can also change the expression and check the collection (View-->Collections) to make it more clear.

Frequent Visitor

Thanks of for the feedback! Now makes sence, and something I sharnt forget! Thanks again for the help!

 

Ian

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (12,396)