Reset drop down list to blank default item without clearing collection
Hi,
My attached simplified example has a drop down list. After the user selects a list item, on clicking reset, the list should reset to the initial blank item, but should not be cleared.
Set Current Form Element Item works to reset to the first item on the list, but it can't reset to the default blank since there is no match.
I need a solution that does not require dependsOn or setting the items or query result collection to {} (as suggested by similar posts).
Thank you,
Helen
-
Hi Helen,
You need to set the current property to undefined on the drop-down list.
This can be done using the Set Form Element Property activity where you are currently using Set Current Form Element Item:
- Element: =$displayForm1.state.dropDownList1
- Property Name: current
- Property Value: (leave empty)
- Markdown: (leave empty)
The reason behind this is that the empty placeholder isn't really considered an "item". In fact, it's not rendered as an option after you select something. However, clearing the current property tells the component that nothing is selected, which in turn resets it to the initial state.
0 -
Hi Ken, could you please have a look at the attached simple example. Choose a state (autocomplete) and you reason for travel (drop down). The change event in the autocomplete is supposed to reset the drop down to blank, but I can't get it to work with Set Form Element Property. It does work for drop down/drop down combinations. I'd be thankful for any solution that works to reset the item list to blank.
Thank you.
0 -
You need to change to another state to see the drop down not being reset
0 -
And I would need a solution without depends on because multiple paths can lead to the drop down. Thanks.
0 -
Anyone? This seems to be a bug?
0 -
Hi Helen,
I tested your workflow and it resets the dropDown when I enter a new state..
0 -
Hi Peter, Apologies, I must have sent you the wrong WF. Please try the newly attached workflow with the instructions I provided before. Kind regards, Helen 0 -
Hi Wout,
thank you. The drop down and autocomplete WF does nor reset for me. It keeps the previous selection, but works if I don't leave current blank .I'm running it in the Sandbox with With WF5 5.11.0
0 -
Meaning it works, if I set it to an item, but does not work if I leave current blank. Is there a version issue?
0 -
It looks like you had the correct file, which does not work for me. Attached again.
0 -
Upgrading to 5.13 solved the issue.
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
11 kommentarer