Zum Hauptinhalt gehen

Reset drop down list to blank default item without clearing collection

Kommentare

11 Kommentare

  • Ken Lyon

    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
  • Permanently deleted user

    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
  • Permanently deleted user

    You need to change to another state to see the drop down not being reset

    0
  • Permanently deleted user

    And I would need a solution without depends on because multiple paths can lead to the drop down. Thanks.

    0
  • Permanently deleted user

    Anyone? This seems to be a bug?

    0
  • Wout Peters

    Hi Helen,

     

    I tested your workflow and it resets the dropDown when I enter a new state..

    0
  • Permanently deleted user
    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
  • Permanently deleted user

    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
  • Permanently deleted user

    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
  • Permanently deleted user

    It looks like you had the correct file, which does not work for me. Attached again.

    0
  • Permanently deleted user

    Upgrading to 5.13 solved the issue.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.