Skip to content

Commit 325f76c

Browse files
author
Jens Kürten
committed
add events to docs
1 parent 7b3df10 commit 325f76c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/reference/events.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,26 @@ This event is fired **after** a document has been released. Raising an exception
9090
|cdb_ec_id|str \| None| Engineering Change ID|
9191

9292

93+
## DocumentFieldCalculationEvent
94+
`csfunctions.events.DocumentFieldCalculationEvent`
95+
96+
This event is fired when a document is created, modified, copied or indexed. It is triggered after the field calculations defined in the datasheet editor are performed.
97+
98+
The event expects a DataResponse containing a dictionary of field names and their new values. Fields that are not mentioned in the response are not updated.
99+
100+
101+
**DocumentFieldCalculationEvent.name:** document_field_calculation
102+
103+
**DocumentFieldCalculationEvent.data:**
104+
105+
|Attribute|Type|Description|
106+
|-|-|-|
107+
|document|[Document](objects.md#document)|Current state of the document|
108+
|action|Literal["create", "modify", "copy", "index"]|Action being performed|
109+
|linked_parts|list[[Part](objects.md#part)]|Parts that belong to the document|
110+
111+
112+
93113
## EngineeringChangeReleaseCheck
94114
`csfunctions.events.EngineeringChangeReleaseCheck`
95115

@@ -215,6 +235,24 @@ This event is fired **after** a part has been released. Raising an exception thu
215235
|cdb_ec_id|str \| None| Engineering Change ID|
216236

217237

238+
## PartFieldCalculationEvent
239+
`csfunctions.events.PartFieldCalculationEvent`
240+
241+
This event is fired when a part is created, modified, copied or indexed. It is triggered after the field calculations defined in the datasheet editor are performed.
242+
243+
The event expects a DataResponse containing a dictionary of field names and their new values. Fields that are not mentioned in the response are not updated.
244+
245+
**PartFieldCalculationEvent.name:** part_field_calculation
246+
247+
**PartFieldCalculationEvent.data:**
248+
249+
|Attribute|Type|Description|
250+
|-|-|-|
251+
|part|[Part](objects.md#part)|Current state of the part|
252+
|action|Literal["create", "modify", "copy", "index"]|Action being performed|
253+
|linked_documents| list[[Document](objects.md#document)]|List of documents that belong to the part|
254+
255+
218256
## WorkflowTaskTriggerEvent
219257
`csfunctions.events.WorkflowTaskTriggerEvent`
220258

0 commit comments

Comments
 (0)