Hello,
I am trying to reset a form when it is submitted via a button, but there is one dropdown which I would like to stay on the same collection, basically one dropdown not to reset.
Any ideas?
You need only be concerned on the Default property of your dropdown control. Make sure it has the value that you want your dropdown to be. Then, when it is reset, it will reset to the default value and show what you want.
I hope this is helpful for you.
Hi,
This would be the case yes, but the box changes after every 5 submissions manually, so would it be possible to stay as the last selected?
Yes, this is all going to depend on the Default property of your control.
First, to be clear - is it a dropdown or a combobox? A combobox works much differently.
If it is in fact a dropdown, then what is the current default property of it?
Okay,
This is a combo box. (My bad)
And the current default of the combo box is clear
Yes...the default property on the combobox does nothing. So, what is the DefaultSelectedItems property of the combobox then?
clear
Okay...that is why it does not maintain a value when it is reset - because there is nothing there for it to default to!
However, with a combobox, the DefaultSelectedItems (DSI) property needs to be set with a record (or table of records if the combobox is multi-select) that matches the Items records.
So what is the Items property of the combobox?
Yes i understand that, hence me coming for help as i wouldnt know where to start!
I would like the box to be clear when the screen is first loaded, and when the form is submitted I would like for the combo box to stay the same as the last submitted choice on the reset/submit button press.
The combo box is not multiselect.
The Items Property is :
["Bay 1 HL","Bay 2 HL","Bay 3 HL","Bay 4 HL","Bay 5 HL","Bay 6 HL"]
This is hardcoded selections of a reduced selection from sharepoint.
Very good. So, perform these changes:
1) In your OnSuccess action of the Form, add the following formula:
Set(glbCurrentRecord, Self.LastSubmit)
2) On the DSI property of the Combobox, set it to:
{Value: glbCurrentRecord.<columnName>}
Replace <columnName> with the name of the column from your data that will contain the value you submitted.
Just for your reference, the reason we are specifying the record with the Value (i.e. {Value: ...) is because your Items property is a table that has a single column called Value (that is what PowerApps will convert the square bracket syntax that you have into a table).
User | Count |
---|---|
261 | |
110 | |
97 | |
53 | |
39 |