Copy Responses
The Copy Responses plugin copies the responses provided for original form and passes them to the indicated fields in another form. It allows to set up an advanced workflow with options for synchronized responses updating and deletion in connected forms.
Please note that this plugin also works with the Question and Answer Identifiers, so you can use them instead of question and answer numbers in the plugin parameters.
The article covers all plugin's settings and its additional features.
How to adjust the Copy Responses plugin
On the Edit Plugin page set up the following parameters to apply the plugin:
Logical Condition - If this field is empty, the plugin would be executed on every submit. You can use Qx.Ay.Cz references in here, AND, OR, NOT operators and regular expressions.
Target Form or Survey Id - Enter the unique ID of the form the data should be copied into.
Merge responses - This dropdown has 3 options: Do not merge, Respondent ID and External ID.
Select the Do not merge option if you want the plugin to create a new response in the target form each time a response in the original form is submitted or resubmitted;
If Respondent ID is selected, copied responses in the target form will be updated automatically when respondents come back to edit and resubmit their original responses.
Choose External ID if you would like to merge responses with the same External ID from multiple source forms into 1 response of the target form.
Respondent ID or External ID - If you choose to merge responses by Respondent ID, reference a question in the original form where the parameter Respondent ID will be recorded by the system. If you would like to merge responses by the External ID, reference a question with the unique custom value which the system will use as an External ID. Use Qx.Ay format or Question/Answer identifiers to specify the question reference.
Overwrite with empty values - This option allows the system to overwrite existing values in target responses with empty values.
Yes means the plugin will overwrite target fields with new empty response values.
No means the plugin will skip empty form fields, and data that was recorded previously for those fields will be preserved.
Auto-Map Questions - This option works only if identical question identifiers are set for questions in both source and target forms. Select 'Yes' if you would like to map questions with the same question identifiers in both source and target forms automatically. If 'No' is selected, the system will process mappings defined in Question references section.
Enable workflow actions in target form - This option allows you to activate or deactivate the execution of the workflow actions (i.e. Email Alerts or using the Workflow plugins) in the source form after a response has been submitted. The option is disabled (set to 'No') by default; you can disable or enable the workflow actions execution at any time by changing this setting. This plugin also triggers the actions of Remote Data Sender (XML/JSON) and Advanced RESTful API plugins in the target form.
Question References - Enter paired references in Qx=Qy format to specify questions to pass the data from and to. For instance, Q1=Q5 means that response from question 1 of the original survey will be placed into the question 5 of the destination survey. The source and target forms questions must have the same type and structure.
We highly recommend hiding a question where the Respondent ID is stored to prevent the ID value editing by respondent.
If the Copy Respondent ID parameter is not specified, and the original response is edited and resubmitted in RBR mode, the plugin will fire and create a new response in the Target form each time response is resubmitted.
If the Copy responses plugin is applied to a form along with the Respondent ID Saver plugin, the Respondent ID Field and Copy Respondent Id parameters must reference different questions in order for these plugins to work properly.
The references specified in Questions References section will overwrite questions mapping generated automatically.
Enqueue target updates feature
The feature ensures that updating of responses from several sources to the same target response happens sequentially to prevent data loss due to conflicts of simultaneous updates.
Please, be aware that it heavily consumes platform resources and must be used only in cases when simultaneous target response updates break solution functionality.
How to get access to the feature
Ask your account manager to activate the feature for your account.
How to apply the Enqueue target updates feature
Select the External ID option from the Merge Responses field.
Select Yes from the dropdown menu from the Enqueue target updates field;
The feature works only with the External ID Merge Responses set up.
If you use API to upload source response, workflow can proceed after return from the call. That is why sometimes the workflow may fail but you still receive a notification of successful response submission/synchronization;
There can be a minor time lag between source response submit/synchronization and workflow updates for several minutes.
Copying responses across different accounts
There are 2 ways to copy responses across different accounts (meaning source and target forms are located in different accounts):
using Form Metadata (deprecated, not recommended)
using form Dataflow setting allowing to accept the data from the form in another account.
Metadata flow
Please set up the following:
Make sure your account manager activated the Survey Metadata feature for your account;
Create as much AllowCopyFrom metadata as necessary in the account where the target form is located. For instance, if it is necessary to copy responses from 3 sources, you should add 3 AllowCopyFrom metadata in the target account:
Go to the target form Settings, set metadata and specify IDs of forms-sources in the following format: AllowCopyFrom=SID;
In the forms-source set up the Copy Responses plugin and in the second parameter specify the unique ID of a target form.
Dataflow setup
Please set up the following:
Make sure your account manager activated the ‘Allow creating an item in another account’ right for both your accounts;
In the form-target settings add the source form ID;
In the form-source set up the Copy Responses plugin and enter the target form ID. You will see the note that the data will be sent to the form stored in another account.
Autocomplete function allows you faster and easier insert questions references. After entering Q or Qx.A system will show you the list of available questions or answer options. Picked element will be substituted by its sequence number within the survey.
Question references can be edited in Quick Edit box.
It is possible to pass files uploaded by respondents from one form to another. To do this, simply reference to a "File upload" question type and the file uploaded in original survey will be available for downloading in destination survey.