The table action task profile defines one of the tasks the application should perform, if they select a table command.

Profile variables

Variable nameTypeDescription
$mapFeatureSetCollectionThe list of layers in the web map. Can be used with the FeatureSetByName or FeatureSetById function to get a particular layer in the map. This can then be queried.
$userIdTextThe unique user ID of the editor who is logged into the application.
$userNameTextThe full name of the editor who is logged into the application.
$userIdentityTextProvides a credential instance. This can be used when accessing external layers with the FeatureLayer function. The credentials represent the user’s logged in credentials.
$sessionDictionaryA dictionary containing key value pairs. The dictionary contains all the session variables that have been configured in the app. When the application first launches, the user will be asked for values for the session variables. They can also (if configured) change session variables in the application. This provides programmatic access to the user’s choices / settings.
$selectionFeatureSetCollectionThe list of layers in the web map. Can be used with the FeatureSetByName or FeatureSetById function to get a particular layer in the map. It will only contain the features from each layer selected on the map. This can then be queried.
$currentMapExtentExtentThe current map extent. This value is not available for all scripts.
$currentToolTextThe type of tool selected. Will be one of new, add, effects, reshape, subtract, pan, select, unprotect. This value is not available for all scripts. It also represents the current state, not the state for why the script is running.
$actionDictionaryThe selected table row will be in $action.row
$targetLayer 1FeatureSetThe layer that is either being filtered, or records are being added, deleted or updated in

1 : This option is only available for certain task types.

Return types

The return value will depend on the type of task being configured.

Example

Please see section Execution tasks and subsections for examples and further information.