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

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (3,286)