Redirect to URL
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens
Sends the user to a URL. The URL can be a full link to another site, a path on your site, or a link to a file. It can also open the URL in a popup or a new tab, or download the file it points to.
It works in Forms, Listings, User Guides and APIs. It isn't available in workflows. It ends the action list, so actions after it don't run.
Typical Use Cases
- Send the user to a thank-you or details page after a form is submitted, for example
/order-details?id=[OrderId] - Open a file created earlier in the action list, for example a PDF from Generate PDF
- Show another page in a popup from a listing button
- Send the user back to the page they came from, using a return URL token
- Return an HTTP redirect from an API
Don't use it to
- Go to a page of your portal by picking it from a list. Use Redirect to Portal Page instead. It also handles languages.
- Download a fixed portal file. Use Send File for Download instead.
- Return a file's content from an API. Use Download File or File Response instead.
- Send data with a
POST. Use Repost Data instead. - Stay on the page and switch to another form tab. Use Change Tab and Stop Execution instead.
Related Actions
| Action Name | Description |
|---|---|
| Redirect to Portal Page | Sends the user to a page of the portal, picked from a list. |
| Send File for Download | Sends the user to a portal file picked at design time. |
| Send Plain Text as File Download | Sends text built from tokens as a file. |
| Download File | Returns a file's content from an API, with permission checks. |
| File Response | Returns a portal file by ID from an API. |
| Repost Data | Sends the browser to a URL with a POST. |
| Stop Execution | Stops the remaining actions without going anywhere. |
Input Parameter Reference
The parameters unique to this action are listed below. Review the common parameters for all actions here.
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| URL | The URL to go to. It can be a full URL, for example https://example.com/page, a path on your site, for example /orders?id=[OrderId], or an anchor on the current page, for example #Id14. An anchor doesn't reload the page. If it's empty, the action does nothing and the next actions run. | Yes | empty string | Yes |
| Escape URL special characters in tokens | URL-encodes the value of each token in URL, for example a space becomes + and & becomes %26. The text you typed yourself isn't changed. Turn it on when tokens are used as query string values. Leave it off when a token holds a whole URL. | No | false | No |
| Open in Popup | Opens the URL in a popup window on top of the current page, inside an iframe. Shown when Open in new tab is off. | No | false | No |
| Popup Title | The title of the popup. Shown when Open in Popup is on. | Yes | empty string | No |
| Open in new tab | Opens the URL in a new browser tab. Safari opens it in the same tab. Shown when Open in Popup is off. | No | false | No |
| Force Download | Downloads the file the URL points to, instead of opening it. When it's on, Open in Popup and Open in new tab are ignored. | No | false | No |
In User Guides, the action only has URL, Open in Popup and Popup Title, and the popup options have no effect.
How the redirect works
| Where the action runs | What happens |
|---|---|
| Forms and Listings, button actions and form events other than On Page Load | The browser goes to the URL. The popup, new tab and download options apply. |
| Forms, On Page Load | The server answers with an HTTP redirect (302) before the form is shown. The popup, new tab and download options are ignored. |
| User Guides | The browser goes to the URL in the same window. |
| APIs | The API answers with 302 Found and the URL in the Location header. The popup, new tab and download options are ignored. |
With Force Download on, the browser gets a download link for the URL. The file name is the last part of the URL path, unless the server sends its own. Browsers only honor this for files on your own site. For other sites, the file may open in a new tab instead.
If URL isn't empty but all its tokens are empty, a form or listing doesn't go anywhere, but the actions after this one still don't run. In an API, the caller is redirected to the site's home page (/).
Considerations
- Don't redirect to user input without checking it. If the URL comes from a token the user controls, for example
[ReturnUrl]from the query string, anyone can build a link to your site that sends users to another site. A value starting withjavascript:can also run script in the browser. Check the value first, for example with a condition that it starts with/but not//. - Use Escape URL special characters in tokens for values in the query string, so values with spaces,
&or#don't break the URL. Don't turn it on when a token is the whole URL, because the:and/characters get encoded too. - Popups use an iframe. Sites that don't allow being shown in a frame won't display. For your own pages, you may want to add query string parameters that hide the site's header and menu.
- Put it last. The action ends the action list. Actions after it don't run, so save data, send emails and so on before it.
- Add a condition to redirect only in some cases, for example
[Status] == "Approved". See Common Parameters. - In APIs, the redirect is the API's response. Browsers follow it. Other callers get the
302status and the URL in theLocationheader.
Examples
To understand how to use the below examples, please see Running Examples.
1. Go to an order details page after submit
This action sends the user to the order details page. The order number and customer name are encoded, so values with spaces or & don't break the URL.
{
"Title": "Redirect to URL",
"ActionType": "RedirectToUrl",
"Description": "Show the new order",
"Parameters": {
"Url": "/order-details?id=[OrderId]&customer=[CustomerName]",
"EscapeUrl": true,
"OpenInPopup": false,
"PopupTitle": "",
"OpenInNewTab": false,
"ForceDownload": false
}
}
2. Download a generated PDF
This action runs after a Generate PDF action that stored the PDF's relative URL in the InvoiceUrl token. The browser downloads the file. Escape URL special characters in tokens is off, because the token holds the whole URL.
{
"Title": "Redirect to URL",
"ActionType": "RedirectToUrl",
"Description": "Download the invoice PDF",
"Parameters": {
"Url": "[InvoiceUrl]",
"EscapeUrl": false,
"OpenInPopup": false,
"PopupTitle": "",
"OpenInNewTab": false,
"ForceDownload": true
}
}
3. Open a page in a popup from a listing
This action, on a listing row button, opens the customer's details page in a popup titled with the customer's name.
{
"Title": "Redirect to URL",
"ActionType": "RedirectToUrl",
"Description": "Show customer details in a popup",
"Parameters": {
"Url": "/customer-details?id=[CustomerId]",
"EscapeUrl": true,
"OpenInPopup": true,
"PopupTitle": "Customer [CustomerName]",
"OpenInNewTab": false,
"ForceDownload": false
}
}
4. Return to a safe return URL
This action sends the user back to the path in the ReturnUrl query string parameter. The condition only allows paths on your own site.
{
"Title": "Redirect to URL",
"ActionType": "RedirectToUrl",
"Description": "Go back to the calling page",
"Condition": "[QueryString:ReturnUrl].IndexOf(\"/\") == 0 && [QueryString:ReturnUrl].IndexOf(\"//\") != 0",
"Parameters": {
"Url": "[QueryString:ReturnUrl]",
"EscapeUrl": false,
"OpenInPopup": false,
"PopupTitle": "",
"OpenInNewTab": false,
"ForceDownload": false
}
}
Revised 09/27/2026