Create Input Fields

You can add input fields to your analytic applications so that application users can enter values and trigger actions based on the values entered.

Procedure

  1. From the Insert area of the toolbar, select Start of the navigation path Next navigation step Input FieldEnd of the navigation path to add the widget to the canvas or popup.
  2. In the Styling panel of the input field, enter a name. By default it's InputField_1.
  3. In the Input Field Value section of the Builder panel, select the source of the input field value from the dropdown of Data Source Type
    • Manual Input

      Under Display Hint, you can enter hint texts to be initially displayed in the input field. If you disable this option, no hint will be displayed either in the application design time or at runtime. After enabling this option, when application users start to enter a value in the input field at runtime, the hint texts will be overwritten by the users' inputs.

    • Script Variables
    • Model Variables
    • Tile Filters & Variables
    • Analytic Application Properties
  4. (optional) You can turn on Enable the write-back in runtime and select a script variable in your application if you want the input field value to be passed to the variable at runtime.
  5. You can further leverage the following APIs to allow for more functionalities in the input field:
    • To get and set the value in the input field, use getValue() and setValue() respectively.

    • To tell whether the input field is enabled and enable it, use isEnabled() and setEnabled() respectively.

      To tell whether the input field is editable and make it editable, use isEditable() and setEditable() respectively.

      Note
      The input field is grayed out at runtime when disabled, but not when uneditable.
    • To trigger the actions after the input, for example, when users enter the text and press Enter, use onChange().

    For more information about APIs, you can refer to Analytics Designer API Reference.