Data Store
Configuring Data Objects used at Submission
Updating writable data upon submission occurs in the background most likely without the user knowing. Individual writes can occur upon the completion of a workflow state or at the end of an entire workflow.
Configuration involves mapping the writable data objects field's (via placeholders) to appropriate questions in the question set.
Configuring a Submission Writable Data Object (Data Store)
From an Form Project project use the Data Stores Icon on the right hand pane to find your writable data objects in the fly-out, drag and drop your selection onto the finish page icon in the question set. A properties panel will display for the Data Store, where appropriate give it a meaningful name.
Design will automatically create an item in the placeholders fly-out. These will need to be mapped to the question set.
Drag the placeholders to appropriate questions in the question set, more information about data types and appropriate quesitons can be found here.
Test your project in Produce and Confirm with the administrator of your data connection that the record has been maintained correctly.
Placeholder and Override Write Behavior
On execution (either via generation, for Data Stores with a "Write On" set in their properties, or via the Override action) the data store will attempt to update all columns in the linked table.
The value passed will be:
- the value specified in the Override action, if any
- otherwise, the value of the form question mapped via placeholder, if any
- otherwise,
NULL
Note: this means that attempting to update only a small number of fields on an existing with an Override action will cause any fields which are not mapped to a placeholder or specified in the action inputs, to be set to NULL in the database. If this is not the desired behavior, the columns should either be mapped as placeholders or specified as inputs on the Override action.
Workflow Write Considerations and Configuration
For non-workflow forms, data stores are written on form submission.
For forms that contain workflow, a 'Write On' drop-down will appear on the data store's properties panel, defaulting to "All transitions". A decision can be made as to whether to:
- Commit the data on all workflow transitions
- Commit the data only at the conclusion of the workflow
- Do not commit the data automatically
In the second and third cases, the "Writable Data Object Override" action is used to manually commit data on a per-workflow-transition basis as desired.
The Writable Data Object Override action is described in detail here.
Object persistence
By default (using Write On All Transitions) the Data Store will attempt to maintain and update a single data record for a workflow. If multiple records need to be created within a single workflow, the Writable Data Object Override action must be used and the ObjectID field should be overridden with a new value.
Repeating Writable Data Objects
Writable data objects can be driven by repeating pages or sections so that an individual record is created for each instance of the repeat. For workflow projects that write on each or more than one workflow transition the initial write will create the records whereas the subsequent writes will edit them including the delete.
Repeat Sources
Repeating Writable Data Objects cannot be driven by a repeating data source. I.e. must be driven by a repeating section.
Use the Repeat checkbox and select an appropriate source to configure a submission data object as repeating.
Updated 11 months ago