thingworx-ptc-logo

There are several ways to clear input fields:

One: Using Widget ResetToDefaultValue Property

resetDefault1

The arrow pointing to ResetToDefaultValue is filled because it is bound to an event.

When to use:

  • Use if there is a single input field
  • Also use when there are other fields that should not be reset at the same time, or by the same trigger

Two: Using Panel ResetInputsToDefaultValue Property

resetDefault2

When to use:

  • If there are multiple, related input fields

Three: Using Mashup ResetInputsToDefaultValue Property

resetDefault3

When to use:

  • If there are multiple related input fields in multiple panels, or even if some inputs are not in panels.

Events that usually trigger this:

  • SetProperties: it is the Composer equivalent to a form submit – after you submit a value, resetting the input signals that it is ready to take a new value
  • Reset Button click
resetDefault4

The click event of setProps button is wired to SetProperties. The ServiceInvokeCompleted event of SetProperties is wired to ResetToDefaultValue on the textInput Widget NumericEntry-21. A reset button could be wired directly to ResetToDefaultValue, or to the ResetInputsToDefaultValue handler of the panel or widget.