Change Tab And Stop Execution
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens
Switches a Tabs module on the same page to another tab, then stops running actions. It's available in forms and listings when the Tabs module is installed. It isn't available in API endpoints.
The Tabs module is a container that shows other modules, such as forms and listings, in tabs or an accordion. This action works with both layouts, and with a Tabs module shown on the page or in a popup.
| Action | What happens after the tab changes |
|---|---|
| Change Tab And Stop Execution | No further actions run. |
| Change Tab And Continue Execution | The tab changes right away and the next actions keep running. |
Typical Use Cases
- Move to the next step of a wizard from the
Nextbutton of the form in the current tab - Open the details tab of a record from a listing, and pass the record's ID to the forms in that tab
- Send the user back to the tab with a problem, for example after a failed check
Don't use it to
- Change the tab and keep running actions. Use Change Tab And Continue Execution instead.
- Open a Tabs module in a popup. Use Open Tabs Popup And Stop Execution instead.
- Hide or disable tabs. Use the tab's show and enable conditions in the Tabs module.
Related Actions
| Action Name | Description |
|---|---|
| Change Tab And Continue Execution | Changes the tab and keeps running actions. |
| Open Tabs Popup And Stop Execution | Opens a Tabs module in a popup. |
| Close Tabs Popup And Stop Execution | Closes the popup of a Tabs module. |
| Initialize Form And Stop Execution | Loads a form that's set to manual display. |
| Stop Execution | Stops running actions without doing anything else. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| TabsPro Module | The Tabs module to change. Pick it from the list, or click EXPR and enter an expression that returns the module's ID, for example [TabsModuleId]. | Yes | empty string | Yes |
| Tab | The tab to switch to. The list shows the tabs of the selected module by title. With EXPR, the expression must return the tab's ID in the Tabs module, not its position. | Yes | empty string | Yes |
| Evaluate state | Checks the show and enable conditions of all tabs again before switching. If the target tab is now hidden or disabled, the nearest available tab is opened instead. | No | false | No |
| QueryString Parameters | Name and Value pairs to pass to the new tab. Forms in it get them as [QueryString:Name] tokens. Tokens work in both the name and the value. | Yes | empty | No |
What happens when it runs
- The server replaces the tokens and sends the instruction to the browser.
- The browser finds the Tabs module on the page. If it isn't loaded yet, it waits up to about 10 seconds.
- If
Evaluate stateis on, the tab conditions are checked again on the server, using the page's query string and theQueryString Parameters. - The tab is switched as if the user clicked it. Forms in the current tab run their
On Tab Leaveactions, which can stop the switch. Forms in the new tab run theirOn Tab Enteractions. See Tab events. - No further actions run.
Passing values to the tab
The QueryString Parameters are passed to the new tab:
- Forms get them in their
On Tab Enteractions, as[QueryString:Name]tokens. A form with noOn Tab Enteractions ignores them. - Listings don't get the values as tokens. Listings set to load or refresh when the tab is activated are loaded again. See Tabs Integration.
- The address bar. When the Tabs module isn't in a popup, the values are also added to the page's URL, next to the query string that's already there.
In Listings
On a listing button with Client Button turned on, use the client-side Change Tab action instead. It has the same parameters and changes the tab in the browser without a request to the server. See Item Buttons and Root Buttons.
Its tokens are replaced when the listing loads, not when the button is clicked. On an item button, that's when the row is shown, so the row's values, such as [Id], are available. On a root button, only values that don't depend on a row are.
Considerations
- Same page only. The Tabs module must be on the page where the action runs.
- Use the tab's ID. An expression that returns the tab's title or position doesn't work. If no tab has that ID, nothing happens and no error is shown.
- Nothing happens if the tab is already open. In the tabs layout, switching to the active tab does nothing, and the
QueryString Parametersaren't passed. - Conditions aren't checked by default. Without
Evaluate state, the action can switch to a tab that's disabled by its enable condition. Turn onEvaluate statewhen the conditions matter. - Values are visible. The
QueryString Parameterscan end up in the address bar, and users can change query strings. Don't pass secrets, and don't trust them for permissions. - Final action. Actions placed after it in the same list never run, unless its condition is false. Use the action's
Conditionto decide when to change the tab. See Common Parameters.
Examples
To understand how to use the below examples, please see Running Examples.
1. Go to the next step of a wizard
Add this action to the Next button of the form in the first tab. It switches the Tabs module whose ID is in the WizardModuleId token to the tab whose ID is in the ShippingTabId token, and checks the tab conditions first.
{
"Title": "Change Tab And Stop Execution",
"ActionType": "TabsProChangeTab",
"Description": "Go to the shipping step",
"Parameters": {
"TabsProModuleID": {
"Expression": "[WizardModuleId]",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"TabId": {
"Expression": "[ShippingTabId]",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"Refresh": true
}
}
2. Open the details tab for an order
This action switches to the details tab and passes the order ID. The forms in that tab can use [QueryString:OrderId] in their On Tab Enter actions, for example to load the order.
{
"Title": "Change Tab And Stop Execution",
"ActionType": "TabsProChangeTab",
"Description": "Show the order details",
"Condition": "\"[OrderId]\" != \"\"",
"Parameters": {
"TabsProModuleID": {
"Expression": "[OrdersTabsModuleId]",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"TabId": {
"Expression": "[DetailsTabId]",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"Refresh": false,
"Params": [
{
"name": "OrderId",
"value": "[OrderId]"
}
]
}
}
Revised 09/27/2026