Skip to main content
Version: 4.62

exportTable

Exports one or multiple tables from the app as a JSON file that can be reimported later using the importTable action.

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params" (required)Objectundefinednull
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type" (required)StringType name of the action.null

Parameters

KeyTypeDescriptionDefault Value
"async"BooleanSpecifies whether the action should perform asynchronously.null
"fileName"StringThe name of the resulting export file."export.json"
"tables" (required)ArrayNames of tables to export.null

Examples

Example 1: Export multiple tables

Show ExampleHide Example

Export the three tables favorites, cart and settings from the app.

{
"type": "exportTable",
"leadingDelimiter": "{&",
"trailingDelimiter": "&}",
"dynamicParams": {
"date": {
"left": {
"context": "date"
},
"transform": "formatDate",
"right": "yyyyMMddHHmmss"
}
},
"params": {
"tables": [
"favorites",
"cart",
"settings"
],
"fileName": "Export_{&date&}.json",
"onErrorType": "breakingEvent",
"onError": "dataExportError",
"onSuccessType": "return"
}
}

Use the current date to give the exported file a unique name so it isn't accidentally overwritten.