I have a single selection listbox. How do I get the text of the selected Item? Trying SelectedItems.Result, SelectedItemText etc. Nothing seems to work . Any ideas? Thx
Solved! Go to Solution.
It really depends on if you have "Allow multiple selections" on.
If NOT, then you can use:
First(ListBox.SelectedItems).Value
If so, then you can use:
Concat(ListBox.SelectedItems, Value & ",")
Or...if you need this formatted with something like comas, then this will do well:
Mid(3, Concat(ListBox.SelectedItems, ", " & Value), 3)
Obviously, replace ListBox in the above formulas to the name of your listbox.
I hope this is helpful for you.
EDIT: Just re-read your question "single selection listbox"...so, the first solution should be fine for you and you can keep the other in your back pocket for a day when you need multiple selections.
Hi,
Test this : DataCardValueX.Selected.Value, where DataCardValueX is the number of your datacard.
It really depends on if you have "Allow multiple selections" on.
If NOT, then you can use:
First(ListBox.SelectedItems).Value
If so, then you can use:
Concat(ListBox.SelectedItems, Value & ",")
Or...if you need this formatted with something like comas, then this will do well:
Mid(3, Concat(ListBox.SelectedItems, ", " & Value), 3)
Obviously, replace ListBox in the above formulas to the name of your listbox.
I hope this is helpful for you.
EDIT: Just re-read your question "single selection listbox"...so, the first solution should be fine for you and you can keep the other in your back pocket for a day when you need multiple selections.
Its a single selection listbox. Your suggestion to use: First(listbox.selecteditems).value worked for me. Thanks for the response
Hi RandyHayes,
Have tried this, but it says concat takes only tables as input. Please let me know if there is a way around.
Thanks in advance!
What issue are you having? The ListBox.SelectedItems is a table. Please re-check your formula and make sure you are using that and referencing the listbox as that.
If you continue to run into issues, I might suggest that you open a new post on the forum so that this will get more attention for you as this thread is pretty old.
Thanks for replying. ListBox.SelectedItemsValues worked!
User | Count |
---|---|
253 | |
122 | |
106 | |
54 | |
48 |