cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
macrag
Level: Powered On

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
Highlighted
Community Support Team
Community Support Team

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

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.
15 REPLIES 15
Community Support Team
Community Support Team

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

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.
macrag
Level: Powered On

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

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

 

 

Highlighted
Community Support Team
Community Support Team

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

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.
macrag
Level: Powered On

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

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
Level: Powered On

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

Hi Macrag,

 

do you get the solution?

 

thanks,

 

YH Low

Anonymous
Not applicable

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

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

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

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

 

souma123
Level: Powered On

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

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

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

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