Data Union
Overview
Data Union combines data from different sets into a single Data Connection. The combined information can then be presented by filtering data, displaying data on screen or on a generated document. This is useful for instances where the SmartIQ Designer wants to combine a list of people, contacts or other information into a single Data Connection and present the combined information in one useful context that has combined columns with rows joined on a shared key.
This can be done by creating a Data Connection in Manage, adding the Data question in the form and setting up the references from the Data Union panel, where you can use the field reference picker to dynamically insert values.
Notes
- Only available fields will display in the properties panel and no additional fields can be added from this panel.
- Additional rows can be sourced from:
- Static non-repeated questions
- Repeating sections
- Data questions
- Combinations of the above
- Chained Data Union is not supported.
For example, in a university application form, each student in faculties can provide their details as well as emergency contact information. Data Union can be used as schema to provide a list of all students, regardless of faculty, or emergency contacts for all students.
Important
A Data Union question on its own will not write or save data to table. To permanently store data, the designer should use either a Custom Data Object, Call SQL Procedure Action or a similar action.
Usage
- In Manage, create a Data Connection and Data Objects specifically for the Data Union.
Note
You can use JSON, CSV or Custom Data Objects as data sources. However, use Custom Data Objects if you want to be able to filter the data.
-
In Design, add static questions to your form.
-
For Repeating Pages, add the data question but refer to the repeating section.
- Add the Data question to your form with your Data Union Data Object.
-
Click the Data Union Properties panel and specify a row name to display.
-
Select the source from the Row Repeat Source drop-down list. These will be from the data sources configured above.
- Use the reference pickers to map the values to the Data Union data connection.
Unique Identifiers
Map unique fields for data sources to ensure that selected values work. For non-repeating sections, add a variable for the unique identifier to the form. For non-repeating sections, map to [rowid] in a variable formula.
- Add more rows as needed.
- The Add button will add a new source of data as a row to the data source.
- The Update button will update the question references for the fields in the selected row.
- The Remove button will remove the selected row.
Updated over 3 years ago