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

List Box Collection not taking all the selected items

Hi Community, 

I am trying to build a list box where the user selects items from the list box and then can save those items to a collection. The code I have written works, however it stops working if more than 6 items are selected. 

Any ideas where it could be going wrong?

melanieschwindt_0-1619198345820.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Anonymous,

Do you want to display the Listbox selected items in a collection with line break using Char(13)?

Could you please share a bit more about the scenario?

I think the key is the Char(13).

Actually, the Char(13) in Power Apps means Enter and the Char(10) in Power Apps means line break. To fit your scenario, I think the Char(10) is your exactly correct choice.

Please modify your formula as below:

Collect(YourCollection,{Tab:"CILs",CILs:Concat(ListBox1.SelectedItems,Value,Char(10)),DueDate:Today(),...})

Note: Just replace the Char(13) with the Char(10).

Hope it could helps.

Regards,

Qi

 

 

Best Regards,
Qi

View solution in original post

2 REPLIES 2
BrianS
Super User
Super User

I need a little clarification - do you mean the 6th time they run through the selection process, or if they select more than 6 things in the list?

v-qiaqi-msft
Community Support
Community Support

Hi @Anonymous,

Do you want to display the Listbox selected items in a collection with line break using Char(13)?

Could you please share a bit more about the scenario?

I think the key is the Char(13).

Actually, the Char(13) in Power Apps means Enter and the Char(10) in Power Apps means line break. To fit your scenario, I think the Char(10) is your exactly correct choice.

Please modify your formula as below:

Collect(YourCollection,{Tab:"CILs",CILs:Concat(ListBox1.SelectedItems,Value,Char(10)),DueDate:Today(),...})

Note: Just replace the Char(13) with the Char(10).

Hope it could helps.

Regards,

Qi

 

 

Best Regards,
Qi

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,430)