Reading through old posts about how to prevent a combobox from resetting. There is no ClearCollect function on the app...
I'd really like to keep showing the selected item after I hit the Save button. (Data is connected to Dataverse)
Multiple choices not allowed and the combo box is showing records from a Project table.
The Default is expecting a Record and using MySelection only in that property gives errors.
In the OnSelect property It worked to add Set(MySelected, ComboBoxProject.Selected) - though adding a .Value or .Result is giving errors.
(Been trying options presented in other threads.)
@andersen_mikael yeah I am very glad for that, makes it better.
Great that it works. The advantage is of course that you avoid a Filter call 🙂
Hey @andersen_mikael
Both of these worked:
DefaultSelectedItems: ThisItem.Project
DefaultSelecectItems: Gallery1participant_1.Selected.Project
Great! It is in a Gallery Control. 🙂 Thank!
For ComboBox's you have to use the DefaultSelectedItems and the record(s) provided has/have to match up with the records provided/specified in Items.
Assuming that Items is equal to 'Project Divisions' in your case, the filter function does exactly that - produce records matching up with the Items.
Since it's in DataVerse you might be able to specify it as follows (depends on how the Project column is specified and how the form is setup)
DefaultSelectecItems: Parent.Default //Assuming the combobox is in a data card for the Project field
Other options that might work.
DefaultSelectedItems: ThisItem.Project
DefaultSelecectItems: Gallery1participant_1.Selected.Project
Okay well i am glad to here it is working now 🙂
Hi @AJ_Z Unfortunately, both gave errors. Though I might be missing something there...
Happy to have been of help so did the MySelected.Name or MySelected not work in default selecteditems
I wondered about that too, in the other threads posters said it should be in the Default property so I followed that. However, I was just listening to Shane Youngs video about it and he said it should be in DefualtItemsProperty.
In that DefaultItemsProperty it worked to do a filter:
Filter('Project Divisions', Name = Gallery1participant_1.Selected.Project.Name)
Thanks for the help!
even though its not multi select put it in default selected items instead of default lets see what happens
try put it in defaultselecteditems instead try with brackets and without brackets
if my comments are helpful be sure to Like/Kudo them and if it is your solution please click accept as solution
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional