Jump to content

Mapping questions to fields

From Resco's Wiki

The data mapping feature allows you to map a question to a particular record field. You can read a field to populate the answer automatically or save the answer to a record field at the end – or both.

Identify the mapped record

You have several options for indicating which record and field should be mapped to an answer.

  • One of the simplest options is using the regarding record. This is the record from which the questionnaire was started. If your workflow assumes that you launch questionnaires from an entity form, for example, you go to an asset and start the inspection, this is the way to go.
  • If you have a list of questionnaire templates directly on your home screen or start inspection differently, the regarding field is empty. Instead, you can add a lookup question to your questionnaire template and then use the lookup target as the mapped record.

Set the mapping direction

Once you identify the record and field, you can choose mapping direction. Essentially, you can:

  • read data from the record to populate the answer on the questionnaire
  • write data from the answer into the record field
  • or both!

You can read the data only once, when the questionnaire is created, or repeatedly, whenever you open an incomplete questionnaire.

You can save the data only once, when the questionnaire is completed, or repeatedly, whenever you save an in-progress questionnaire.

Edit the questionnaire template

  1. Edit a questionnaire template in the designer and enable Data Mapping in the toolbar.
  2. Click the link button to start the data mapping wizard.
  3. Select which record should be linked to the question:
    • Regarding record (Record from which the questionnaire was started)
    • Record from a lookup question
  4. For each entity, select the record that should be mapped.
  5. Finally, select whether to read data from the record field or save the answer to the field.

Select record Select mapped fields for the regarding record Select mapped fields for the lookup record Select when to apply mapping

Usage in the app

Once you start such a questionnaire in the app, the record data can populate the default answers. And when you complete it, changed answers can be saved to the mapped record. For example, your inspection could include details of the inspected entity. In the example below, you can review and update the contact information of your contact directly from the questionnaire.

When you start the questionnaire without a regarding record or without answering the lookup, you can continue using the questionnaire as usual. The data mapping is ignored: the answer is not populated at the start and is only saved in the questionnaire.

Example"