cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
macrag
Advocate I
Advocate I

ListBox control - Pre select the multiple values saved in to Sharepoint

Hi

 

I have added a ListBox control on to the Edit Form and setting the Default property (saved as Comma seperated items).

 

Is this is a limitation or any work around is available as I know some one suggested to use the Gallery control but placing a Gallery control is not an option due to its floating nature on a Form.

 

can some one from microsoft or Powerapp Experts please confirm whether this is raised as a bug or a limitation, as currently users can select Multiple Items from a Listbox.

 

here is my hack for this so far. Setting Default property to this

Left(SaveFormGalleryList.Selected.CustomerType,Find(",",SaveFormGalleryList.Selected.CustomerType) - 1)

 

this is basically reading the comma seperated values from the Gallery control

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @macrag,

 

To save the ListBox selected items into a string is available.

But to have the string seperated, and then have the results shown in a listbox is not possible, at least currently.

There is an idea submitted on this:

Function to split a string into a table with results

 

To save the selected results into a string, we need to use the Concat function:

Concat(ListBox1.SelectedItems.Value,Value&",")

See the results:

12.PNG

 

If you have any further questions, please post back.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

16 REPLIES 16
v-micsh-msft
Community Support
Community Support

Hi @macrag,

 

I am a little confused about your scenario, would it be possible for you to share some screenshots here?

 

SharePoint Multiple value is not supported.

For more known issues, please check:

Connect from Microsoft PowerApps to SharePoint

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Michael

 

What I am trying is, i have added listbox control to the form and saving the multiple items selected from the list box control to sharepoint as comma seperated items and when retrieving them back i just wanted to show them as selected. see below if it make sense

list.PNG

sharepoint.png

 

 

Hi @macrag,

 

To save the ListBox selected items into a string is available.

But to have the string seperated, and then have the results shown in a listbox is not possible, at least currently.

There is an idea submitted on this:

Function to split a string into a table with results

 

To save the selected results into a string, we need to use the Concat function:

Concat(ListBox1.SelectedItems.Value,Value&",")

See the results:

12.PNG

 

If you have any further questions, please post back.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks Michael

 

Yes, I managed to save using Conact and Until we can show the multiple selected items back in a listbox then this is a limitation  and a blocker for us. I will wait until we found a work around.

yhlow
Frequent Visitor

Hi Macrag,

 

do you get the solution?

 

thanks,

 

YH Low

Anonymous
Not applicable

Untitled.png

ProjectAssignToList

Untitled1.png

 

AssignToList

 

Untitled2.png

 

Set DefaultSelectedItems = Filter (AssignToList.Title , Title in ( Filter(ProjectAssignToList,ProjectName=DropdownProject.Selected.Value).AssignTo))

If you save multiple value with comma seperated than use following :

Filter (AssignToList.Title , Title in Filter(Split(First(Filter(ProjectAssignToList,ProjectName=DropdownProject.Selected.Value)).AssignTo,","),Result in AssignToList.Title))

 

Anonymous
Not applicable

AssignToList

Untitled2.png

 

ProjectAssignToList

Untitled1.png

 

Set DefaultSelectedItems = Filter (AssignToList.Title , Title in ( Filter(ProjectAssignToList,ProjectName=DropdownProject.Selected.Value).AssignTo))

If you save multiple value with comma seperated than use following :

Filter (AssignToList.Title , Title in Filter(Split(First(Filter(ProjectAssignToList,ProjectName=DropdownProject.Selected.Value)).AssignTo,","),Result in AssignToList.Title))

 

Untitled.png

 

Hi , 

 

Could you please tell me what to do in my case :

 

i have 

* text box like : "Junuary;February;March;June;July;August;September;December"

* List Box  having all the month of a year, 

 

I want to preselect only the months listed in my text box , 

I tried this : Split(monthtextbox,";")  but it displays : the property expects record values , but this rule produces incompatible table value

Anonymous
Not applicable

Filter (monthofyear.Title , Title in Filter(Split(Textbox.Text,";"),
Result in monthofyear.Title))

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,521)