Get next step
Function: Get next step
This function helps you manage multi-step processes or forms, often called "Steppers," within your application. It allows you to automatically determine the next step in a sequence based on the currently active step. This is useful for guiding users through a workflow, like an onboarding process or a multi-page form, without needing to manually specify each step.
Input
- Stepper UI Element: This is the specific Stepper component on your application's screen that you want to interact with. You need to tell the system which Stepper you're referring to so it can find its current position and calculate the next one.
Output
- Result: This is where the numerical identifier (or "code") of the next step will be stored. You can then use this stored number to navigate to that specific step or perform other actions. By default, this will be stored in a variable named
NEXT_STEP.
Execution Flow
Real-Life Examples
Here are some examples of how you might use the "Get next step" function in your application:
Example 1: Advancing a Multi-Step Form
Imagine you have a three-step application form (Personal Details, Address Information, Confirmation). When the user clicks "Next" on the "Personal Details" step, you want to automatically move them to "Address Information."
- Inputs:
- Stepper UI Element:
My Application Form Stepper(the name of your Stepper component)
- Stepper UI Element:
- Result: The variable
NEXT_STEPwill contain the numerical identifier for the "Address Information" step (e.g.,2). You can then use another action to set the Stepper's current step to this value.
Example 2: Conditional Navigation Based on Progress
You have an onboarding flow with several steps. After completing a step, you want to check if there's a next step available before deciding whether to show a "Next" button or a "Finish" button.
- Inputs:
- Stepper UI Element:
Onboarding Process Stepper
- Stepper UI Element:
- Result:
- If the user is on step 1,
NEXT_STEPwill contain the numerical identifier for step 2. - If the user is on the last step, the action will result in an error (or an empty
NEXT_STEPvariable, depending on your error handling setup), indicating no further steps. You can then use a conditional logic block to display the "Finish" button ifNEXT_STEPis not found.
- If the user is on step 1,
Example 3: Tracking User Progress in a Tutorial
You're building an interactive tutorial where users click "Continue" to move through different sections. You want to store the numerical identifier of the next section they need to complete.
- Inputs:
- Stepper UI Element:
Product Tutorial Stepper
- Stepper UI Element:
- Result: The variable
NEXT_STEPwill hold the numerical identifier of the upcoming tutorial section. This could be3if they just finished section 2. You could then save thisNEXT_STEPvalue to a user's profile to track their progress.