Some fielding arrangements require the storing of data from one survey area in another survey's database. To accommodate this requirement, use the storedatafrom
and storedatato
tags on the appconfig
widget. The application of these tags is equivalent to a dataset merge, in which the databases from the sending survey(s) and the receiving survey are identical. It is possible to direct more than one survey's data to store in the same location.
Caution! It is important to note that these tags treat the involved survey locations' databases as undifferentiated. If multiple surveys are linked, the comprehensive data is able to be viewed in each linked survey location.
Syntax
Sending survey
appconfig storedatato: Survey ID where data is to be stored
Receiving survey
appconfig storedatafrom: First survey ID where data is originating, second survey ID where data is originating, etc.
Example
Let's assume that we have two surveys, survey_one and survey_two. It is desired to use survey_two to store data in survey_one. This means survey_one will be storing data from survey_two. When establishing the app configs for these two surveys, the following code would be used at the beginning of the surveys.
#survey_two initial code appconfig storedatato: survey_one #survey_one initial code appconfig storedatafrom: survey_two
The "database" that stores the data is essentially one and the same. Therefore when users view the reports for either survey, they would match each other. Furthermore, if any records were deleted from one survey, it would delete the same records in the other survey as well.
Additional Information
- The storing survey must contain all fields from the survey(s) it is storing data from.
- No records should be in-progress when making modifications to where datasets are stored.
- Both tags must be used in tandem. In the event that a destination or source survey is missing, or does not contain a tag specifying the storing/sending survey, the compiler provides a warning. In this case, no link will be made between the surveys.
- The default system variable
origin_survey
reports the app_id of the survey the record originated from. - When making source updates to surveys utilizing these tags, it is not necessary to update one survey or the other first EXCEPT if the updates are modifying the from/to relationship. In that case, update the
store data to
survey first, then thestore data from
survey.
Comments
0 comments
Please sign in to leave a comment.