Creating and Using the Input Field

With input fields, analytic application users can enter a random value and trigger what-if scenarios based on the value entered.

Context

As an application designer, you can follow the steps below to add and configure an input field.

Procedure

  1. On a canvas or popup page, select Start of the navigation path Next navigation step Input FieldEnd of the navigation path.
  2. In the Styling panel, enter a name for the input field widget. By default, the name is InputField_1.
  3. Configure the Display Hint option.

    If you disable this option, no hint will be displayed either in the analytic application design time or at runtime. After enabling this option and entering a hint, when application users later start to enter a value in the text box during the analytic application runtime, the hint will be overwritten by the user-entered text automatically.

  4. In InputField Style, configure the style of the input field such as border, background, and font size.
  5. After you create and configure the input field widget, you can leverage existing APIs to receive user input for further processing:
    • To get and set the value, use the APIs getValue() and setValue().

    • To tell whether an input field is enabled or not and set an input field to enabled, use the API isEnabled() and setEnabled() respectively.

      To tell whether an input field is editable or not and set an input field to editable, use the API isEditable() and setEditable() respectively.

      Note
      The difference between a disabled status and not editable status is that when you set the API setEnabled() to false, the input field will be grayed out during analytic application runtime, while the status not editable is not.
    • To trigger certain actions when the focus is no longer in the input text box during analytic application runtime, for example, when users type Enter in the keyboard after entering a text, use the API onChange().