EntityFormView

Label: :IA_Function
Property: type: EntityFormView
Inherits from: Function and View

Used to create and edit both nodes and relationships in a single form.

Parameters

Key Description Default value Possible values
entityType Entity kind to edit. Required when loading by id. node / relation
node Node object to edit directly. null node object
relation Relationship object to edit directly. null relation object
id Id of an existing entity to load from API. null string or number
store Store name used when loading/saving entities or as default for new entities. application configured store name
stores Available stores shown in the selector while creating a new node. [] array of store names
preset Initial entity values when creating/editing. {} object

preset structure

For node editing:

Key Description Possible values
preset.id Existing node id string or number
preset.labels Initial labels array of strings or comma-separated string
preset.properties Initial properties object
preset.meta.store Initial store configured store name

For relation editing:

Key Description Possible values
preset.id Existing relation id string or number
preset.type Relation type string
preset.from Source node id (or node object) number or node object
preset.to Target node id (or node object) number or node object
preset.properties Initial properties object
preset.meta.store Initial store configured store name

When preset.from and preset.to are node objects, they must belong to the same store.

Use only one of node, relation, or id in the same execution.

Property editing

The form supports these property input types:

  • auto (auto-detect)
  • string, number, boolean
  • date, localtime, time, localdatetime, datetime
  • object, array, json
  • point2d, point3d, duration
  • fileupload

For typed entities, the view auto-adds the type property when:

  • a new node gets the IA_Function label
  • a new relation gets the TRIGGER type

Outgoing triggers

Type: submitted

Occurrence: After a successful save (for both create and update actions).

Additional event properties (besides the inherited properties):

Key Description Possible values
entityType Saved entity kind node / relation
node Saved node (only when entityType=node) node object
relation Saved relation (only when entityType=relation) relation object

Type: created

Occurrence: After a successful save when creating a new entity.

Additional event properties (besides the inherited properties):

Key Description Possible values
entityType Saved entity kind node / relation
node Created node (only when entityType=node) node object
relation Created relation (only when entityType=relation) relation object

Type: updated

Occurrence: After a successful save when updating an existing entity.

Additional event properties (besides the inherited properties):

Key Description Possible values
entityType Saved entity kind node / relation
node Updated node (only when entityType=node) node object
relation Updated relation (only when entityType=relation) relation object

Notes

  • Save stores the entity, fires triggers, and closes the view.
  • Apply stores the entity, fires triggers, and keeps the view open.
  • Cancel closes the view without saving.

Example configuration

Create a new node:

{
  "type": "EntityFormView",
  "entityType": "node",
  "store": "application",
  "stores": ["application", "archive"],
  "preset": {
    "labels": ["Person"],
    "properties": {
      "name": "Alice",
      "age": 30
    }
  }
}

Create a new relation:

{
  "type": "EntityFormView",
  "entityType": "relation",
  "preset": {
    "type": "KNOWS",
    "from": 101,
    "to": 202,
    "properties": {
      "since": 2020
    }
  }
}

Load an existing node by id:

{
  "type": "EntityFormView",
  "entityType": "node",
  "id": 123,
  "store": "application"
}