The attribute split calculation profile automatically calculates a new value for an attribute for the result features when a feature is split.

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.
$editingLayerFeatureSetThe layer to which $feature belongs to. Can be queried to find other records.
$featureFeatureThe feature that has been edited, added or worked on.
$originalFeatureFeatureThe original version of the feature before it was edited. This is not available for all situations where scripting is run.
$valueAnyThe value to test in the script. Certain rules, such as the restrict domain values rule, pass in a value for the current field value.
$parentFeatureFeatureIf there is a geographic contains relationship for the current feature being edited, this variable will contain the parent (or containing feature).
$routeFeatureFeatureIf the feature is a linear referencing feature, this variable will reference source route/line feature.
$unchangedMapFeatureSetCollectionThe list of layers in the web map with data as it was originally before the current editing operation began executing. This is not available for all situations where scripting is run.
$onlyCausedByCrackingBooleanBoolean value to indicate that this feature has only been changed to add vertices to prevent slithers appearing.
$splitParentFeatureWhen running a split operation, and the slip field rule is running, this will contain the original feature being split.
$splitChildrenFeatureSetWhen running a split operation, this will contain all the child features that will be created from the split operation.

Return types

Date | Number | String | null
(depending on the type of field)

Example

Set field as a proportion of the parent:

/** Apportion totalAmount field, by the area of this child compared
 *  to the original parent feature
 */

return (
  ($splitParent.totalAmount * Area(Geometry($feature))) /
  Area(Geometry($splitParent))
);