Primitive
atom.findOrCreateDataField
BETAShort name: findOrCreateDataField
Version: 1.0.0
Create a data field when missing, otherwise update it, while reusing append/update primitive behavior.
Back to primitive libraryInputs
| Key | Type | Required | Description |
|---|---|---|---|
| atomId | objectId | true | Atom id to mutate. |
| fieldName | string | true | Top-level field key under atom.data. |
| isPublic | boolean | false | Optional field-level visibility override. |
| lexemeAliases | object | false | Optional lexemeId to label map. |
| value | any | true | Value for the field entry. |
| valueType | string | false | Optional AtomFieldInputType metadata. |
Outputs
| Key | Type | Required | Description |
|---|---|---|---|
| action | string | false | Mutation action: "appended" or "updated". |
| atom | object | false | Updated atom summary from delegated mutation primitive. |
| dataDriftReport | object | false | Optional non-blocking lexeme/data drift diagnostics for unknown fields, missing required fields, type mismatches, and validator warnings. |
| fieldName | string | false | Field key that was appended or updated. |
| previousValue | any | false | Previous value when action is updated. |