|
|
Line 690: |
Line 690: |
|
| |
|
| See '''[[Mobile reports for Resco Inspections]]''' for a more detailed discussion of your reporting options in Resco Inspections. | | See '''[[Mobile reports for Resco Inspections]]''' for a more detailed discussion of your reporting options in Resco Inspections. |
|
| |
| == Technical information ==
| |
|
| |
| Resco Inspections utilizes the data-driven architecture rather than the metadata-driven approach. It means that the Resco Inspections data model (entities, fields, relationships) is already created, and when building a new custom questionnaire template you are not altering the data model – instead, you’re adding the entity records. As a consequence, the user who manages the questionnaire templates does not have to be a backend administrator since this user is not changing the data model.
| |
|
| |
| All questionnaire data is saved as records on your backend server (Resco Cloud/Dynamics/Salesforce), in multiple custom entities:
| |
| * '''Questionnaire''' (resco_questionnaire) stores information about the questionnaire templates, snippets, and answered questionnaires. Each questionnaire can contain any number of question groups and questions. How is a particular questionnaire record used depends on the following properties:
| |
| ** As a questionnaire template (if Is_Template = Yes)
| |
| ** As a snippet (if Is_Snippet = Yes)
| |
| ** As a filled-in questionnaire
| |
|
| |
| * '''Question Group''' (resco_questiongroup) stores information about the question groups. Each question group can contain multiple questions.
| |
|
| |
| * '''Question''' (resco_question) stores all the questions created for the questionnaire, as well as answers. The unformatted answer value can be found in the Value (resco_value) field; formatted value in the Value Label (resco_valuelabel) field.
| |
|
| |
| * '''Questionnaire Folder''' (resco_questionnairefolder) stores information about the folder structure that organizes questionnaire templates in the designer. Each folder can contain multiple questionnaire templates. Usually, this entity does not need to be enabled in the app project.
| |
|
| |
| When an app user starts a questionnaire in the app, a new copy of the template is created. For an answered questionnaire, we store both questions and answers. This approach ensures that when you change your questionnaire template, existing answered questionnaires are not affected; historical records are not altered.
| |
|
| |
| See also: [https://blog.resco.net/2020/06/02/resco-inpections-for-dynamics-365-data/ Dynamics 365 – how is the data stored?] {{Badge|Blog}}
| |
|
| |
| === Data model ===
| |
|
| |
| Questionnaire data can be saved in three different ways:
| |
|
| |
| * Record-based model (default): Each answer in a questionnaire is a record.
| |
| * JSON / compressed JSON: Answer are stored in JSON format that might be compressed. JSON requires fewer records and may result in faster synchronization. However, analyzing the answers may require additional effort.
| |
| <!-- * Hybrid model (planned for a future release): Combination of the previous two models. For each question, you can configure what you prefer. -->
| |
|
| |
| The data model can be configured on the '''Properties''' pane, in the '''Answer Storage''' field.
| |
|
| |
| === Completion status ===
| |
|
| |
| A questionnaire has a completion status field (resco_completionstatus) that can take three values:
| |
| * [0] Active (incomplete, in progress)
| |
| * [1] Completed
| |
| * [2] Canceled
| |
|
| |
| === Images ===
| |
|
| |
| Questionnaires may include images. Questionnaire Designer supports several image-type components in two main groups:
| |
| * static image and logo: these are added to the questionnaire at design time by the author of the questionnaire template
| |
| * dynamic images: images that the inspector can take when filling out the questionnaire
| |
|
| |
| For each image, you can configure where it should be saved. Select an image-type component and on the '''Properties''' pane, configure the value of the '''Storage Entity''' property.
| |
| * Use annotation (or a different entity that supports binary attachments) if you want to save images directly in the database.
| |
| * Use one of the supported cloud document servers for storing images, such Google Drive or SharePoint. See [[Documents#Cloud_storage_for_questionnaire_images|Documents]] for more information. Cloud document storage requires a bit more effort to set up, but in general, cloud storage is cheaper than database space.
| |
|
| |
| If you need to access questionnaire images on the database level, for example, when designing a [[sync filter]] or custom reports, consider the following information:
| |
| * In the annotation (or similar) entity, the Regarding/objectid field contains the reference to the questionnaire, and the Title/subject contains the reference to the question on which the image is saved.
| |
| * For the logo, the Title/subject equals "-resco_logo".
| |
| * See [[Mobile_reports_for_Resco_Inspections#Images_from_repeatable_groups|detailed instructions]] how to access images from repeatable groups.
| |
|
| |
|
| == See also == | | == See also == |