0

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

enter image description here

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?

1 Answer 1

0

Use below formula in Default property of text box control:

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

Where ListBox1 is the name of ListBox control.

Output:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.