Create Text Input Forms in Notebooks

The Text Input form allows you to dynamically retrieve values as defined in the notebook.

To create a Text Input form:
  1. Open the notebook in which you want to add the Text Input form.
  2. In a SQL statement, define the Text Input form by using the syntax:
    ${formName}
    For example, run the SQL statement:
    SELECT * FROM ALL_OBJECTS WHERE OBJECT_TYPE = '${OBJ}';
    In this example,
    • The form name is obj
    • The table name is ALL_OBJECTS
    • The column name is OBJECT_TYPE
    Here, the text form obj is created for the column OBJECT_TYPE in the table ALL_OBJECTS. You can enter different values in the form field obj and run the notebook to retrieve the corresponding values in the column OBJECT_TYPE.
  3. Run the paragraph. The notebook now displays the text input form field obj, as shown in the screenshot. You can enter values in the obj field, and run the notebook to retrieve the corresponding values for the column OBJECT_TYPE in the table ALL_OBJECTS.
    • If you enter TABLE in the obj field, and run the notebook, then the notebook retrieves TABLE in the column OBJECT_TYPE, as shown in the screenshot.text input form with object type table
    • If you enter VIEW in the obj form field and run the notebook, then the notebook retrieves the value VIEW in the column OBJECT_TYPE, as shown in the screenshot. text input form with object type view
  4. You can also assign default values in the form by using the syntax:
    ${formName=defaultValue}
    To assign a default value to the Text Input form, modify the SQL statement to:
    SELECT * FROM ALL_OBJECTS WHERE OBJECT_TYPE = '${obj=TABLE}'
    Here, the default value assigned to the form is TABLE. Once you run the paragraph, the default value TABLE will be retrieved in the column OBJECT_TYPE, as shown in the screenshot.
    text input form with default value