Confirm Block
Prompt the user for confirmation and control flow based on their response
Overview
The Confirm Block is a user input block that prompts the user for confirmation. It returns either true or false based on the user’s response, making it useful for controlling flow in your application based on user inputs.
Inputs
The message to display to the user when prompting for confirmation. Only available when “Use Input” is enabled.
A value to wait for before showing the confirmation prompt. Only available when “Wait For Input” is enabled.
A value that will be passed through to either the True or False output depending on the user’s response.
Outputs
The value
input is passed through this output if the user confirms positively.
The value
input is passed through this output if the user confirms negatively.
Editor Settings
The message to display to the user when prompting for confirmation. Only editable when “Use Input” is disabled.
When enabled, allows the prompt message to be provided via the prompt input port instead of the editor settings.
When enabled, delays showing the confirmation prompt until the “Wait For” input receives a value.
The format to render the prompt in. Can be either “preformatted” or “markdown”.
Example: Confirming a Delete Action
- Add a Confirm Block to your flow before a critical delete action.
- Set the
prompt
to “Are you sure you want to delete this item? This action cannot be undone.” - Connect your delete action to the
value
input - The delete action will only execute if the user confirms positively via the
output
port. ThefalseOutput
port can be used to handle the negative confirmation case.
Error Handling
The Confirm Block does not typically produce errors as it simply waits for user input. However, if there are issues with the user interface or the block fails to receive a response, it may timeout and return an error.
Always provide clear and concise messages to users to ensure they understand the implications of their confirmation or denial.