Ask User Input
What does Ask User Input do?
The Ask User Input directive prompts the user for input. The inputted value is then saved to the step’s output variable or can be saved to a custom named variable.
How do I use the Ask User Input directive?
This directive consists of a question, which Proggy will ask the user. The response the user provides must be a single line text.
Proggy will capture the output (minus the newline ie. enter key) of the user and will capture it into its output variable, which you can reference later on in other directives.
Optionally, you can specify a default value, which can be great for designing a good user experience. Let’s take a closer look at setting up default values.
How to set up default values
You can set up default values by directly specifying it in the Default value (optional) field (see above screenshot).
It is also possible to input a Liquid template variable, and Proggy will dynamically inject the value here.
For example, let’s say you want to ask a user for a secret key, but the user already has an existing environment variable for the secret key:
Here, we can reference the environment variable (in the example, we call {{ env.MY_SECRET_KEY }}
).
Behaviour of the Ask User Input directive
- By default, this directive requires the user to make a non-blank input. If the default value is set, then it is possible for the user to enter a non-blank input (ie. just pressing the enter key).
Example use cases for the Ask User Input directive
- Asking for IP address prior to the Run Remote Command directive
- Asking the user for the find and replace value prior to the Find and Replace directive