Hello the Community,
I would like get the last user selection of a combobox.
For example, in my Combobox, I have 3 items ["item1", "item2", "item3].
Firstly, the user selects "item1" and after "item2". Now, here I want display in a TextBox : "Your last selection is item1" (with a variable for example)
It works with a Dropdown and its onSelect property, but I need features of Combobox (mostly isSearchable and reset). So I can not use a Dropdown.
Could you help me ?
Bye.
Charlie.
I'm using the ComboBoxSample data that is structured like the image below. You'll need to adapt the code to fit the Items in your ComboBox.
In the OnChange property of your ComboBox, enter:
Collect(boxHistory, {value: Self.Selected, index: Last(boxHistory).index + 1})
In your label/textbox, enter this for the Text property, where "Value1" is the field you want to display from the ComboBox.
LookUp(boxHistory, index = Last(boxHistory).index - 1).value.Value1
Result:
Be sure to clear the collection at the appropriate time so it doesn't retain the history past where you want it to.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473