Datasource Add
Audience:
Low-code EngineersSkill Prerequisites:
Listings
Takes the user to the page where new entries are added to the listing's data source. The page is the Add Url set in the listing's data source settings. It opens in the same browser tab or in a popup over the listing.
It's used on listing buttons, usually a root button named Add. It's also what the Add Item special button uses.
Typical Use Cases
- Add an Add button above a listing that opens a form for a new record
- Open the add form in a popup, so users stay on the listing page
Don't use it to
- Add a row directly inside the listing. Use Datasource Inline Add instead.
- Open a form on the same page with query string values. Use Open Form Popup And Stop Execution instead.
- Go to any other URL. Use Redirect to URL instead.
Related Actions
| Action Name | Description |
|---|---|
| Datasource Edit | Opens the data source's Edit Url for a listing item. |
| Datasource View | Opens the data source's View Url for a listing item. |
| Datasource Delete | Deletes a listing item from the data source. |
| Datasource Inline Add | Adds a new row inside the listing. |
| Datasource Refresh | Reloads the listing data. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Open in Popup | Opens the add page in a popup over the listing instead of in the same tab. The page is loaded in an iframe, so it should look good without the site's header and menu. | No | Off | No |
| Popup Title | The title shown at the top of the popup, for example New Product. Only used when Open in Popup is on. | Yes | empty string | No |
Where the URL comes from
Set the URL in the listing's data source settings, in the Add Url field. It's available on the Database Table, SQL Advanced Query and SQL Select data sources. See Listings Datasources.
- The URL can contain tokens, for example
/products/edit?category=[QueryString:Category]. - A
returnurlquery string parameter with the listing page's URL is added automatically. The add page can use it to send the user back. - With the obsolete Action Form data source, the URL is the form's page. It has no Add Url field.
- If the Add Url is empty, or the data source doesn't support it, the action shows the error
No add url defined for this datasource.
Considerations
- Final action. The action returns a result to the browser, so actions after it in the same list don't run.
- The listing isn't refreshed when a popup closes. Closing the popup only hides it. The listing shows new entries after it reloads, for example when the page is loaded again. The obsolete Action Form data source is the exception: submitting the form closes the popup and refreshes the listings on the page.
- Use it in a root button's
Actionslist. It doesn't need a selected item. In aPer Item Actionslist, the browser ignores the result, so nothing opens. - Listings only. Use it in listings. The User Guides module lists an action with the same name, but 1.28 has no implementation for it there.
Examples
To understand how to use the below examples, please see Running Examples.
1. Open the add form in a popup
This action opens the data source's Add Url in a popup titled New Product.
{
"Title": "Datasource Add",
"ActionType": "DataSource.Add",
"Description": "Open the new product form in a popup",
"Parameters": {
"OpenInPopup": true,
"PopupTitle": "New Product"
}
}
2. Go to the add page in the same tab
This action takes the user to the data source's Add Url, replacing the listing page.
{
"Title": "Datasource Add",
"ActionType": "DataSource.Add",
"Description": "Go to the add page",
"Parameters": {
"OpenInPopup": false
}
}
Revised 09/26/2026