Input parameters are a core, unique part of Hex. Input parameters can be created in the Notebook view and then added, optionally, to an app.
Add an Input cell
Add an Input cell to your project from the cell bar at the bottom of your Notebook, or from the + Add option between cells.
Right-click to replace code with a parameter
If you highlight and right-click some code in a Python or SQL cell, you can use the Add Input Parameter option to replace your code with an input value directly.
Configure an Input cell
All Input parameters have two base options, accessible from the configuration menu:
Label: text label displayed above the element, primarily in the App Builder.
Name: reference name in code, prefixed with a $. Changing this name will automatically update references to this parameter throughout the Notebook view.
Reference Input parameters
Inputs are stored as Python variables, e.g.,
input_1 that can be referenced throughout your project, just like other variables.
Input variables cannot have their values reassigned, e.g.,
input_1 = 123 will not effectively re-assign the parameter to
123. Instead, you will have created a new variable, which is not connected to the input parameter, with the name
input_1 and value
Include Input parameters as URL parameters
For published apps, Input parameter values can be specified as part of the URL. For more information and examples, see our documentation on sharing links to Published apps.