question

johnjohn-0472 avatar image
0 Votes"
johnjohn-0472 asked CaseyYangMSFT-4714 commented

Get the selected items inside a List Box and assign them to a SharePoint text field Defult property

I have a ListBox inside my Power Apps screen, as follow:-


133143-per.png


and i have a hidden text box, where i want to define the Default value for the text box to be the selected items (if any) from the ListBox separated by ",".. so from the above screen the Default value for the text box should be "Wireless Mouse/Keyboard" , while if the user select all the values inside the List Box, then the Default value for the textbox should be "Docking Station,Wireless Mouse/Keyboard, Monitors ".. any advice on this please?

Thanks


office-sharepoint-online
per.png (27.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

CaseyYangMSFT-4714 avatar image
0 Votes"
CaseyYangMSFT-4714 answered CaseyYangMSFT-4714 commented

Hi @johnjohn-0472,

You could use the following formula in Default property of text box control:

 Left(
     Concat(
         ListBox1.SelectedItems,
         Value & ", "
     ),
     Len(
         Concat(
             ListBox1.SelectedItems,
             Value & ", "
         )
     ) - 1
 )

Note: ListBox1 is the name of your ListBox control.

For Reference:
https://sharepoint.stackexchange.com/questions/297607/get-the-selected-items-inside-a-list-box-and-assign-them-to-a-sharepoint-text-fi
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


If an Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @johnjohn-0472,

I'm checking how the things are going on about this issue. Is there any progress on this issue?

0 Votes 0 ·