TemplateSetValue
org.sagebionetworks.repo.model.grid.update.TemplateSetValue
Sets a column's value by composing a string from a source template, then optionally applying a regex-replace to that intermediate string.
| Field | Type | Description |
|---|---|---|
| concreteType | STRING | Required. Full name of the exact type used. |
| columnName | STRING | Target column name to update. |
| sourceTemplate | STRING | Required. Template string with column placeholders in {columnName} format. Example: '{firstName} {lastName}' concatenates two columns with a space. Invalid column names in placeholders will trigger onMissingValue behavior. |
| pattern | STRING | Optional. A Java-compatible regex pattern to apply to the intermediate string generated by 'sourceTemplate'. |
| replacement | STRING | Optional. The replacement string using regex capture group references ($1, $2, etc.). Only used when 'pattern' is provided. Examples: '$1-$2' to join groups with a dash, '$2-group-$1' to reorder. If 'pattern' is specified without 'replacement', defaults to '$1' (extracts first capture group). |
| onMatchFailure | OnMatchFailure | Action if 'pattern' is provided but does not match. SET_NULL sets the value to NULL. SET_UNDEFINED removes the key from the JSON object. SKIP_UPDATE leaves the existing value unchanged. |
| onMissingValue | OnMissingValue | Action if a column referenced in 'sourceTemplate' is null/undefined. SET_NULL sets the value to NULL. SET_UNDEFINED removes the key from the JSON object. SKIP_UPDATE leaves the existing value unchanged. USE_EMPTY_STRING replaces the missing value with '' (empty string) when interpolating the template. |