Set Data
A saved write, create, update or delete, one record at a time, with events to validate and react around it.
A Set Data program is a saved write. Creating a new row, updating an existing one, or deleting it, every mutation in a Xuda app is a Set Data program: a target datasource, an operation mode, parameters mapped onto the table's fields, and lifecycle events for validation or side effects.
Properties
progDataSource
Same shape as Datasource. For C the filter fields are unused, the write always creates a new row. For U and D, dataSourceFilterModelType plus dataSourceIndexId (or a query) locate the target record.
progFields
Each entry binds a parameter to a column on the target table (data.type: "table") or declares a caller-only parameter (virtual). When a workflow calls the program, matching parameters populate these fields before the write runs.
progEvents
Calling a Set Data program
The set_data action runs it; name.outputField can receive the written record on the caller:
Worked example
Choose the mode
crudMode: "C" to insert, "U" to update a located row, "D" to delete one.
Bind the fields you write
Give each progFields entry data.type: "table" with a field_id matching the target table's column.
Locate the row for U or D
Set dataSourceFilterModelType to index (with dataSourceIndexId) or query, exactly as a Get Data program would.
Create a Set Data node under Programs, choose the CRUD mode on its Properties tab, then bind fields on the Fields grid the same way as Get Data.