Questionnaire Designer
Resco Inspections |
---|
|
Questionnaire Designer, also called Inspections Designer is a web application that runs in a web browser. It is one of the main components of Resco Inspections that allows users to build questionnaires in a data-driven user interface. It utilizes a per-record architecture (not per-entity), so you don’t need to work with metadata when creating questionnaire forms – no need to have system admin access privileges and mess around with potentially risky data scheme changes.
Instead, any skilled user can design one-of-a-kind questionnaires and select the best from the wide variety of available question types: Inspectors can be asked to fill out checkboxes, select picklists, scan barcodes, take and edit photos, and much more. Conceptually, this list of questions serves both as a guidance for workers and a control tool for checking the process of inspection.
You can set up a custom business logic for your questionnaires, utilizing smart elements or questionnaire rules. Once your questionnaire is ready, you can instantly deliver it to your field team via the app.
Questionnaires and snippets
Questionnaire is the main tool of Inspections scenarios. It is a structured form consisting of set of components or question groups designed to collect, manage and store data (information) on specific topics from users.
Generally, a questionnaire is the data collecting technique that serves for:
- Fieldwork operations – provides instructions and collects feedback from respondents.
- Communication purposes – collects information about various issues and topics as a first-hand communication channel with respondents.
Sometimes, when the distinction is important, we use the term questionnaire template to denote the questions and set them apart from the answers. Use the designer to prepare the templates, then use the app to fill in the answers.
Snippet is a portion of a questionnaire that you can save separately. You can reuse them in the same questionnaire at multiple locations, or even in different templates. Snippets can include questions and/or groups. See this blog for tips how to speed up the setup of questionnaires using snippets. Blog
Life cycle of a questionnaire template
Over time, you might need to modify your questions. You have two options for managing your templates.
- Non-versioned templates
- These templates have a simple life cycle. They start in draft status. You can then Activate them to make them available in the app, or Deactivate them to disable them. You can edit non-versioned templates at any point; it can happen that your app users manage to launch the questionnaire while you're in the middle of a change.
Note | We're deprecating non-versioned templates. See Deprecations for details. |
- Versioned templates
- These are useful if you expect more frequent editing of your templates and you want to avoid the potential pitfalls. Once you enable Versioning for a template, this process cannot be reversed. These templates also start in draft status. You have the option to Stage them, i.e. make them available in the app, but only for test users. You can Publish them to make them available for all users.
- Once published, you cannot edit a template. However, you can Revise it to create a new version in draft status, while your app users continue to use the published version. Once you're happy with your draft or staged revision, you can publish it; moving the previously published version to archive. You can also access the version history and easily return to an older version of the template.
When revising a questionnaire template, you can set whether existing associations should remain intact:
- Association with an existing entity record
- Association with a custom mobile report
When publishing a questionnaire template, you can enter custom publish notes that are displayed in the version history of the template.
To control which questionnaires can users see in their app, use filters. For information about status code numbers, see the Resco Inspections data model.
See also: Quick guide to versioning and folders Blog
Using versioned templates means that old template versions gain the archived state. Sometimes, the sync filter for the Questionnaire entity is configured to exclude archived templates. If you attempt to view old answered questionnaires (that use an archived template with medium or high dependency level) in the app in offline mode, you may encounter the Questionnaire template not found! error. In this case, consider modifying the sync filter to make archived templates available in the offline mode.
Feature Version
As we keep adding features to questionnaires, every now and then, we might introduce breaking changes. To make sure that Resco mobile apps can gracefully handle this formatting change, we are using Feature Version (property of the questionnaire template). Whenever a breaking change is introduced, the required feature version increases. If you attempt to open a questionnaire with unsupported features in an older app, an error message is displayed, and users are urged to update their app.
Alternatively, you can edit the questionnaire template in the Questionnaire Designer and lower the feature version to ensure that the questionnaire stays compatible with older app versions. However, some newer questionnaire features will be unavailable. If you're familiar with Woodford projects, this is similar to publishing app projects with older Publish Version.
Feature version | Release | Description |
---|---|---|
1 | 15.0 | Introduction of feature version |
2 | 16.1 | Rename "[Clear]" option in option sets Label position "BorderTop" |
Accessing the designer
- Microsoft Dynamics CRM
- Log in to Dynamics. In the list of published apps, search for Resco Suite. Select Inspections > Questionnaire Designer.
- Resco Cloud
- Log in to your organization and select Questionnaire Designer.
- Salesforce
- Log in to Salesforce, start the App Launcher, then select Questionnaire Designer. Requires Resco managed package.
Managing questionnaires
The designer main screen shows a list of your questionnaire templates. If you have many templates, you can use the left menu to filter the entries. You can also access snippets here.
The top right corner has a pair of buttons that allow you to switch between grid layout (default) and list layout.
The main toolbar offers the following functions (not all functions are available for snippets).
Actions group
- New – Create a new questionnaire or snippet from scratch.
- Edit – Open the selected item for editing.
- Delete – Permanently delete the selected questionnaire, snippet, or folder.
- Clone – Create a copy of the selected item. You are prompted to enter a new name for the duplicate.
- Activate / Deactivate – Mark a template as active or inactive. Active templates are available in the app.
- Associate – Use this function to add or remove entities to which the questionnaire should be associated. See also this blog post. Blog
Data group
- Import – Select a .qbuilder file and import it.
- Export – Export the selected questionnaire or snippet in XML format (.qbuilder file).
- Select / Deselect – Select multiple items for bulk operations.
Warning | While in theory, you can edit a qbuilder file in an XML or text editor and upload the changes back to the Questionnaire Designer, Resco cannot officially support such questionnaire templates.
Also, do not modify any questionnaire-related records (questionnaire, question group, question) directly, for example, using the Admin Console. Such changes can break your questionnaires and crash your apps. |
Versioning group
- Versioning – Enable versioning for a template. This cannot be reversed.
- Version History – Show a list of versions available for this template.
- Publish – Make the questionnaire available in the app. Similar to Activate for non-versioned questionnaires. Published templates cannot be edited.
- Stage – Make the questionnaire available for test users in the app. Staged templates can still be edited.
- Revise – Change the status of a template to Draft (makes it available for editing). Available for published or archived versions.
- Archive – Mark a published template as archived: This will make the template unavailable in the app.
- Discard – Permanently delete current draft version.
Folders group
Use folders to keep your questionnaires organized.
- New Folder – Create a new folder.
- Rename Folder – Rename a folder.
- Move To – Move a template or folder to a folder.
You can also click Delete in the Actions group to delete a folder including all templates and subfolders.
Note | Folders only serve to organize templates in the designer; they have no impact on questionnaire availability in the app. To modify which questionnaires are available in the app, use the view filters. |
Library group
- Sample Templates – Import sample questionnaires. Select templates from different industry verticals, such as manufacturing, property maintenance, or energy.
Tip | Additional templates are available for free download on Resco web (see also instructions). |
Creating a new questionnaire
- Select New from the toolbar or click New Questionnaire from the questionnaire list to start the new questionnaire wizard.
- Review the questionnaire settings:
- Versioning: Versioned templates grant you more control over the lifecycle of questionnaire templates.
- Dependency: Determines whether the questionnaire answers are saved in a self-contained way or depend on the original questionnaire template (saves storage).
- Answer Storage: Defines how the questionnaire answers are stored.
- Score: Scoring allows you to assign a score to each answer.
- Check the Best practices for deploying Inspections and also Deprecations related to some of the legacy options.
- Do one of the following:
- Click Create to continue with your current settings.
- Click Set to recommended to apply the optimal questionnaire settings, then click Create.
- Click Settings and finetune the questionnaire settings to your preference. Click Create to conclude the wizard.
Import XLS/CSV
Since Release 14.2, you can import questions from CSV or Excel files into the Questionnaire Designer as a new template.
- Select New from the toolbar or click New Questionnaire from the questionnaire list to start the new questionnaire wizard.
- Select Import from Excel, then click Select file and upload the file with your questions.
- Select the questions and groups that you want to import. You can also modify labels and question types as needed.
- Conclude the wizard as described above.
The spreadsheet file must be in a specific format. To get started, you can copy the table below (including the header row) into a suitable editor and save it as a CSV/Excel file; or you can download a sample file from our web.
Group name | Repeatable group | Question name | Question type | Question options |
---|---|---|---|---|
Root text question | Text | |||
Root number question | Decimal Number | |||
Group 1 | TRUE | Group 1 text question | Text | |
Group 1 | TRUE | Group 1 number, question | Whole number | |
Group 2 | FALSE | Group 2 text question | Text | |
Group 2 | FALSE | Group 2 number question | Whole number | |
Group 3 | FALSE | Group 3 single choice q | Single Choice | a|b|c |
Group 3 | FALSE | Group 3 multiple choice q | Multiple Choices | a|b|c |
Group 3 | FALSE | Group 3 option set q | Option Set | a|b|c |
Group 3 | FALSE | Group 3 yes no q | Yes/No | Yeah|Nope |
Import PDF/image
Since Release 14.3, you can import questions from PDF or image files into the Questionnaire Designer as a new template. This function uses Amazon Textract for parsing documents. The file should be no more than 10 pages long and its size less than 10 MB. See also the limitations of the service, such as supported languages.
- Select New from the toolbar or click New Questionnaire from the questionnaire list to start the new questionnaire wizard.
- Select Scan and Extract and accept Amazon Textract terms and conditions and privacy policy.
- You can convert some pages for free. If you need more, set up an AWS account and activate Textract. Back in Questionnaire Designer, click Textract Credentials and enter your Amazon Textract account information.
- Click Next and upload the file with your questions.
- Select the questions that you want to import. You can also modify labels and question types as needed.
- Conclude the wizard as described above.
Editing a questionnaire
Main toolbar
Main toolbar is in the top section of the application. These are the commands available on the main toolbar.
- Publishing group
- Save – Save the questionnaire
- Save & Close – Save the questionnaire and returns user to the home screen.
- Publish – Make a versioned template available in the app.
- Stage – Make a versioned template available for test users in the app.
- Edit group
- Clone – Clone/duplicate the selected component
- Delete – Delete the selected component
- Organize group
- Move Up – Move up the selected component
- Move down – Move down the selected component
- Collapse All – Collapse all components in the central pane and in the Navigation pane
- Expand All – Expand all components in the central pane and in the Navigation pane
- Multiselect - Allow you to select multiple components. You can use the selection for example to create a snippet.
- Create Snippet – Select multiple components (for example using the Multiselect button), then click Create Snippet and specify a distinct name to save it for later use.
- Scoring
- Score – Enable or disable scoring.
- Data Mapping
- Enable or disable data mapping.
- Preview
- Preview Form – Preview the questionnaire in your browser. Rules are ignored in preview mode. You must save the questionnaire at least once to allow preview.
- Preview Report – Preview the report for the questionnaire in your browser (not available for Dynamics and Salesforce backends).
- Report Settings – Configure your report preview.
- Preview JSON – See how an answered questionnaire might look in JSON format.
- Rules group
- On Create – Executed when a questionnaire instance is about to be created
- On Load – Executed when the user starts filling out the questionnaire
- On Save – Executed when user completes the questionnaire
- On Change – Executed each time a value of a question is changed by the user
- On Repeat – Executed when a new instance of a question group is created
- On Delete – Executed when an instance of a question group is removed from the questionnaire
- Commands group
- Edit – Select which commands should be available in the app for users who fill out a questionnaire.
- On Can Execute – Using rules, configure when a command is available.
- On Execute – Using rules, configure what happens when a command is executed.
- Styles
- Styles – Use styles to modify how the questionnaire appears in the app. You can change for example text color, alignment, position of questions and answers, etc.
- Report themes – Select one of the preconfigured themes for your reports.
- Localization
- Use localization to define language mutations for your questionnaire.
The Navigation pane shows a chronological list of components within a questionnaire, similar to a table of contents. Selecting a component in the Navigation pane also selects it in the main central pane and displays the component's details in the properties pane on the right. For longer questionnaires, you can collapse groups for a better overview. You can also use Multiselect components here.
Components pane
The Components pane shows a list of available components or building blocks that you can add to your questionnaire.
The main component of a questionnaire is a group. It is a collection of questions. Typically, it is used to categorize questions by relevance.
Static components
Static components are designed to show static text, images, links, or entity links. These components cannot be changed by the user filling the questionnaire template.
Component | Description |
---|---|
Logo | Allows you to upload your company's logo (or any other image). Each questionnaire template can have only one logo. It is placed on top of the questionnaire. The same image can also be used for the automatic report. |
Guide | Adds a link to a guide. Inspectors can study the guide to find the necessary knowledge, without leaving the questionnaire. To find the link, start the Guides editor, select a guide, and share it. Once you enter a correct guide link to the Questionnaire Designer, the guide title is automatically updated. |
Description | Adds a section for describing questions, questionnaire sections or for providing any other information for the user, other than a question. It consists of a label and a description part and can be used as a separator component. |
Link | Adds a static link. |
Entity Link | Adds a section with a static link on an entity record. It is possible to set the label, description of a section and label for the link. Clicking on “Click to select…” opens a window where an entity and its record that is going to be linked, is set. A typical use case for this component is to provide additional documentation (manual, scheme, or legal information) for a question. |
Static Image | Adds a section with a static image on a questionnaire template. It is possible to set the label and description of the image, as well as the maximum display width or height. The image aspect ratio is preserved and smaller images are not upscaled. |
Button | Adds a button to your questionnaire. Select from the list of predefined actions (for example, save) or define your own custom action using rules. Requires release 14.1. |
Questions
Questions are components that you can add to the questionnaire and users can or must provide an answer in some form.
Component | Description |
---|---|
Text | Add a question type of a single line of text. |
Multiple Lines of Text | Add a question type of multiline text on a questionnaire template. |
Single Choice | Add a question with multiple answer options on a questionnaire template. Users can only select one of the available answers. Single Choice also comes with a built-in search option, users can start typing their answer to quickly find it in a large list. |
Multiple Choices | Add a question with multiple answer options on a questionnaire template. Users can select multiple available answers. |
Whole Number | Add a question that requires a whole number as an input. The number has to be in between the minimum and maximum limits if they are set. |
Decimal Number | Add a question that requires a decimal number as an input. The number has to be in between the minimum and maximum limits if they are set. Users can also specify precision for the input that represents the number of decimal digits. |
Yes/No | Provide users with a switch between two values. You can set the label for each. |
Option Set | It's similar to the Single Choice component, but each item is composed of a text label and number value. The number is saved as the answer. |
Date | Add a field to the questionnaire template to enter date data. |
Date and Time | Add a field to the questionnaire template to enter the date and time. |
Lookup | Add a field to a questionnaire that can be answered by selecting an entity record. |
Image/Media | Add a question that requires one or more images as an answer. Image is stored either in an entity that supports attachments (for example, note/annotation) or in external document storage (such as Google Drive or SharePoint). Optionally, select the image question and check Image Description on the Properties pane to add an optional text field under the image. |
Tagged Image | Add a question that requires a picture as an input. Additionally, you can mark portions of the image with tags. |
Image Recognition | Add a question that requires a picture as an input. Uses AI Image Recognition for further processing. |
Signature | Add an input for the signature. Signature is stored as Note image. |
Add an input for the email address. | |
URL | Add an input for a specified URL. |
Barcode | Add a way to scan a barcode. Learn more. Blog |
HTML | Add a text field. |
Some question types might be unavailable if your inspectors are using smartwatch or voice to perform the inspection; see supported question types.
Regarding lookup component
Component | Description |
---|---|
Regarding Lookup | Regarding lookup is a special component. When you open the questionnaire from an entity record, this field is automatically filled with the record. In this case you might just want to display it on screen. Alternatively, when you start the questionnaire from the home screen, this field will not be filled automatically; the user of the mobile app can select an entity record there. Just make sure that this component has its targets set to the entities you plan to use this questionnaire for. |
Snippets pane
The Snippets pane shows a list of available snippets that you can add to your questionnaire.
Properties pane
When you select a component in a questionnaire or snippet, the properties of the component are displayed on the right side of the window.
Basic properties
- Id – Each component has its own unique ID. Users can’t change it.
- Name – User can edit the displayed name for any component. It can be changed at any point, however, if the displayed names are used in any rules, you must change the rules as well.
Properties on Questionnaire level
- Label – The displayed name of the questionnaire.
- Status – Questionnaire templates start in Draft status. Status cannot be changed on the Properties pane, use toolbar buttons instead. Available values depend on whether the questionnaire template is versioned or not:
- Non-versioned: Active, Draft, Inactive
- Versioned: Draft, Published, Staged, Archived
- See lifecycle of questionnaire templates and Resco Inspections data model for more information.
- Version Name – Internal name of the versioned questionnaire. You set it when you enable versioning for a template; it cannot be changed afterward.
- Version – Number of the version. Assigned by the system, cannot be changed.
- Reuse Answers – Select whether answers from previously completed questionnaires should be prefilled on new questionnaires:
- Never: Do not reuse.
- First Match: Take answers from the first completed questionnaire that the system can find.
- Ask User: User can decide whether to prefill answers or not.
- Select by User: User can select from a list of previously completed questionnaires.
- Reuse Fetch – Click to display the Filter editor where you define or modify the list of questionnaires available for reuse.
- Validate On – Select when to validate answers: when saving or when completing the questionnaire.
- Rules version – Select which version of rules to use. In general, use "Latest". See Editing rules for more information.
- Scoring – Assign a score to each answer to quickly measure questionnaire results. See Scoring.
- Group Expanding – Choose Single Group if you want to keep only a single question group expanded when answering questionnaires. All other groups are collapsed to better focus your attention.
- Last Modified On – Date and time of the last time the template was modified.
- Last Modified By – User name of the user who saved this template for the last time.
- Script Path – Path to the offline JavaScript file that offers enhanced logic to the questionnaire.
- Compress properties (Salesforce only) – Large questionnaires on Salesforce can run into maximum field size limitation. Enabling compression can help. See details.
- Feature Version – Track compatibility of new questionnaire features with older apps. See Feature Version for more information.
Answered Questionnaire
- Dependency Level – Should the questionnaire answers be saved in a self-contained way (independent from the questionnaire template, duplicating all template data), or save only answers and link to the original questionnaire template. See performance considerations for details.
- Storage – Select how should the answers be stored. See Resco Inspections data model more for details.
- Records: This is the default option. Each answer is transferred and saved as a single record during synchronization. This may make synchronization slower, but ensures the best compatibility with the backend servers and allows you to leverage existing tools to visualize the data.
- JSON (Legacy): All answers are saved in a single field of the questionnaire entity. JSON offers improved synchronization performance, however, not all tools understand JSON.
- JSON (New): Revised customizable JSON format is customizable and requires less database storage.
- Compression: If you are using JSON, you can optionally compress it to save even more space.
- Configure JSON: When using the new JSON formats, you can either select the minimum variant or the configurable flexible format.
Note | Self-contained questionnaires are being deprecated in favor of full template dependency. Legacy JSON is being deprecated in favor of newer JSON formats. See Active deprecations for more information. |
Layout
- Layout Type – Use List to display one question per row. Use Grid if you want to organize multiple questions in a row. See grid layout for more information.
Reporting
- Enable Auto Report – Enable if you want to generate a mobile report from your questionnaire and you want to set up this report directly in the Questionnaire Designer. See Mobile reports for Resco Inspections for more information.
- Include Unanswered – Do you want to include unanswered questions in the report?
- Header Style – Select the style for the header block displayed on the mobile report.
- Footer Style – Select the style for the footer block displayed on the mobile report.
Questionnaire Icon
- Questionnaire Icon – You can upload an image that will be used as the icon for the questionnaire in the app.
Properties on Question level
- Style > Name – Choose a style how to display the question in the questionnaire
- Reuse – prefill answer for this question
- Format – some components offer the additional option to select the desired format which may affect how the component is presented in the app. For example, if you select "Multiple Lines of Text", the app displays a larger text field where the user can type the answer.
- Show on report – when enabled, the component is visible on the report.
- Reporting > Style – Choose a style how to display the question in the mobile report
- Preview Answer – Enter an answer for this question that should be used when previewing the mobile report
Lookup questions
- Filter – you can set up filter the available records or change the sort order.
- Allow Create New – users can create a new record directly from the questionnaire
Properties of Image/Media
- Image Description – Enable this option to add a text field under an image question that serves as an image description. Not available for multi-image questions.
- Storage Entity – Available for image-type components. Select where should the image be stored: Either in an entity that supports it or in external document storage.
- Max Count – Allow the user to answer a single image/media question with multiple images/files (default=1, max=100).
- Width (px) & Height (px) – Restrict the display size of images in the app.
Allowed actions (some actions might be unavailable depending on the capabilities of the device)
- Action Mask – numeric representation of the actions selected below (you can copy/paste this number to quickly reuse your actions setup for a different image question)
- Signature – allow user to answer the image question by drawing a signature
- Capture Photo – allow user to answer the image question by capturing a photo
- Select Photo – allow user to answer the image question by selecting from your existing photos
- Edit Image – allow user to edit the image
- Use Last Photo Taken
- Load From – allow user to load answer from iCloud
- Paste – allow user to answer the image question by pasting a previously copied image
- Select File – allow user to answer the image/media question by selecting from files
- Record Audio – allow user to answer the image/media question by recording an audio message
- Record Video – allow user to answer the image/media question by recording a video message
- Import – allow user to answer the image/media question by importing a vCard
Multi-image questions
- Max Width (px) – restrict the maximum width of uploaded images to this value in pixels
- Max Height (px) – restrict the maximum height of uploaded images to this value in pixels
- Max Size (KB) – restrict the maximum file size of uploaded files to this value in kilobytes
See also multi-image FAQ.
Image grid – set up how multi-image questions should be displayed on the questionnaire and on the report.
- Images per Row – How many images should be displayed in a single row?
- Image Count – How many images should be displayed in total? The app indicates if the count of images/media exceeds this number.
- Image Fit – How should images be resized to fit the container? Use Contain to preserve the aspect ratio and resize to fit the given dimensions. Use Cover to keep the aspect ratio and fill the container, clipping portions that don't fit.
Properties on Group level
- Repeatable – Repeatable groups may appear in your questionnaire multiple times.
- Min Repeat Count, Max Repeat Count – Specify how many instances of a question group are allowed.
- Copy Values – Prefill answers to the questions in a repeated group based on the previous answers. This is useful when most of the entered values don't change.
- Layout Type – Use List to display one question per row. Use Grid if you want to organize multiple questions in a row. See grid layout for more information.
- Show Header – Display group header on the report?
- Header Style – Select the style for the group header block displayed on the mobile report.
- Questions Layout – Select how the content of the group should be arranged on the report:
- Use Horizontal to display multiple questions in one row
- Use Vertical to display one question per row.
- Use Custom to design your own layout. See instructions.
- Break After – Used together with questions layout: set how many questions should be displayed in one row or column before continuing to the next row/column.
- Repeat Layout – Use Default to display question and answer together, or Compact to display question only in the header and then list answers.
- Border Type – What borders should be displayed in the report? No borders – Outside borders – Rows – Columns – Grid.
- Line Color – Set the color for border lines.
See also smart question properties below.
Managing components
- To add components to a questionnaire or snippet, go to the Components pane and click the plus sign (+). The chosen component is added into or under the currently selected component.
- To select a component, click it - either in the Navigation pane or in the central pane.
- To move a component to a different location, click the left part of the component and drag it to the right spot. Alternatively, use the Move Up and Move Down toolbar buttons.
- To toggle visibility of a component, use the eye icon.
- To mark a question as mandatory, click the exclamation point (!).
- To create a duplicate of a component, click Clone.
- To delete a component, click Remove.
Question names
When you add or edit a question, consider reviewing also a question's Name parameter on the Properties pane. Question names are formed from the question's label. The name serves as a human-readable identifier of the component for example in rules or in reports. It is also used for file names for image-type questions when using external cloud document storage. When you change a label, verify that your rules or image links still work correctly.
If your question name is too long (hundreds of characters), you might run into operating system limitations. For example, trying to save a file with the name derived from a question may fail because the name is too long.
Smart question properties
You can add no-code business logic to your questionnaire.
- On each question, you can select the "smart" option for controlling whether a question is visible, enabled, required, or whether the answer is mapped to a record field.
- On each group, you can select the "smart" option for controlling whether a group is visible and expanded.
- Select a question (or group).
- Click one of the business logic buttons
directly on the question and select Smart.
- In the Smart question editor, specify when should the question be visible, enabled, or mandatory. Build conditions by clicking and selecting the appropriate option from a drop-down list.
- You can specify multiple conditions and group them using logical and or or operators.
- Click OK to save the conditions.
Use colors to identify how a particular smart property is configured:
- Blue means yes or true (for example, a question is enabled or visible)
- Grey means no or false (for example, a question is hidden or not required)
- Green means smart, i.e., smart question properties are enabled for this question or group. To disable the smart logic, click the green button to open the conditions editor and then click Reset.
Note | Alternatively, you can use rules or JavaScript to add more advanced business logic to your questionnaire. |
Smart default values
For many question types, you can configure a default value. These defaults can include values from the entity record, from which you open the questionnaire. For example, for text type questions, it might make sense to offer your record's city or the name of the current app user.
You can select the value from a list. You can even combine the values with your own text, for example, the default for a favorite restaurant could be "The Best Sushi in {{Regarding.City}}".
These smart default values work best if you are using the default entities and with default fields. The system attempts to map the selected smart default to an entity field. For example, the smart default value Contact Name, if you are on the contact entity, it's simply the field contact.name; if you are on the account entity, it's the primary contact reference field.
See also: Configuration – Smart default in action YouTube
Smart styles
In the case of numeric questions, option sets, and yes/no questions, you can add a specific style to the values that are answered.
Groups
Questions are usually organized into groups. One of the advantages of groups is that they can be set as repeatable. Instead of creating a questionnaire with the same set of questions multiple times, repeatable question groups offer the ability to repeat the grouped questions either arbitrarily (not known beforehand) or precisely specified number of times.
Repeatable question groups are useful in cases such as when:
- User needs to enter multiple addresses
- User needs to enter data about more than one result of the same issue (checking 10 identical parts of a machine)
- User needs to enter multiple pictures of the same object
Use the group property Copy values if you want that the answers to the questions in a repeated group are pre-filled based on the previous answers. This is useful when most of the entered values don't change.
Using Woodford, it is possible to add a custom icon for your question groups.
For each question group, you can track the completion percentage using rules. See Track group completion for more information.
New instance of a repeatable group
Use the plus button in the top right corner to create a new instance of a repeatable group.
Optionally, you can add a custom button component to your questionnaire that creates a new instance. This can be useful, for example, if you have a large group with many questions. Users won't have to scroll back to the group's top to create a new instance.
Question indexes
Individual questions have numerical indexes, question groups have alphabetical indexes, and they are sorted alphabetically.
Question groups are always displayed after the questions with numerical indexes. It is not possible to re-position question groups; only sort them by changing their alphabetical index. For example, it is not possible to put question group B between questions with indexes 2 and 3. Still, it is possible to place question group B instead of question group A, changing its position within the question group section.
Lookup
The lookup question allows the user to answer by selecting an entity record. When designing a lookup question:
- You must select one or more entities as target(s) of the lookup.
- You can configure a filter to display only the relevant records to the user.
- You can configure a custom view displayed in the app to locate the record. Click the View icon in the target entity row and define up to 7 fields that should be displayed in the view.
- If this custom view does not exist, the app uses the lookup view for the entity (if any), or simply the default view.
- Remember that one questionnaire can be used in different app projects, and each project can have different views. As a result, the same questionnaire template can look differently depending on the app project of the inspector. Set up a view directly in the questionnaire to prevent this from happening.
- If you enable Allow Create New in the question properties, users can create a new record from the questionnaire.
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 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 detailed instructions how to access images from repeatable groups.
Document roundtrip
If you add a default document to an image/media question in the Questionnaire Designer, you can use it in document roundtrip scenarios - when the inspector must edit the document during the inspection. The inspector can then tap the default document in the app, modify it in a third-party editor on the device, and save and close the editor; the modified document automatically replaces the default.
Tagged image
The tagged image question allows the user to capture or select an image, and then drag tags onto the image. On devices that support augmented/virtual reality, such as HoloLens, you can instead capture a holographic scene. In the questionnaire template, each tag is actually a question group. Users can add information to each tag. If the question groups are repeatable, the tag can be dragged to the image multiple times.
- Edit a questionnaire template.
- Go to the Components pane and add a Tagged Image to the template.
- Add one or more question groups to the template. For example, create repeatable groups called Person and Thing.
- Add some questions to each group. For example, into the Person group, add a Text question called Name and a Whole Number question called Age.
- Select the Tagged Image question created in step 2. On the Properties pane, check what Actions should be available: Capture Photo or Select Photo. By default, both are enabled.
- In the Allowed Groups selector under Tagged Image, select the question groups that you want to be available as tags, then click + button to add them.
- For each added group/tag, you can then:
- Select the background color of your tag
- Upload an icon that appears in the center of your tag.
- Mark the tag as mandatory.
Button
This static component offers similar options as questionnaire commands. Users tap the button to perform an action. The main difference is that buttons can be placed directly into the flow of the questionnaire.
When you add the button to your questionnaire:
- Enter a name.
- Optionally, provide descriptive text displayed above the button.
- Select the action that the button should perform.
- Tips
- Some actions allow you to enter additional parameters. For example, the Run mobile report action allows you to select the report to run.
- You can use styles to change how buttons are displayed in the app.
- You can define a custom action for the button using rules. For example, this simple rule toggles the visibility of question 3.
- The rule for a button applies only in the context of that button; i.e., you don't have to start with
If ChangedItem Equals myButton
.
Grid layout
Since release 14.2, you have the option to display multiple questions in one row.
- Edit a questionnaire template.
- Select the top-level element of the template (if you want to arrange top-level questions) or any question group (if you want to arrange questions in that group).
- On the Properties pane set Layout Type to Grid; then click Edit.
- On the Edit Layout screen:
- Set the number of columns and rows using the toolbar buttons or plus buttons.
- Select a row and configure its height (or use automatic height).
- Select a column and configure its width. You can either specify an absolute value in pixels, or a fraction. For example, if you have 3 columns with widths 100px / 1 fraction / 2 fractions, the first column will be 100 pixels wide, and the remaining space will be divided among columns 2 and 3, with the third being twice as wide as the second.
- Select the fields (listed in the left pane) and drag them to the right spot.
- Select a non-empty table cell to set up column span, row span, and borders.
Note |
|
Scoring
Questionnaire scoring is a function that allows you to assign a score to each answer, and depending on the total score, you can quickly evaluate how a questionnaire was answered, for example, pass or fail.
- Enable scoring: Edit a questionnaire template, select the questionnaire body, and on the Properties pane, set Scoring to enabled.
- For each question set a score value.
- For some questions, for example, text or image, you can assign a single score for answering the question.
- For multiple-option questions, you can define a score for each option.
- For numbers, you can define ranges and a score for each range.
- Optionally, scroll down to the end of the questionnaire template to the Questionnaire Result section and define labels to score ranges. Ranges can overlap; the first matching range is used as the questionnaire result.
The final score or the result is displayed for completed questionnaires in the app and also in the Results Viewer.
Editing rules
Rules describe sequences of steps that are executed when a user is filling out the questionnaire. These steps allow you to further customize the questionnaire form’s design and usage (hide or disable form fields, assign values to them, etc.). To create a rule, open the Rules editor by clicking on the corresponding event button.
- On Create rules are executed before a questionnaire instance is created.They can be used to populate variables for the reuse fetch. Requires version 3 (or later) of rules and version 15.0 (or later) of the mobile app.
- On Load rules are executed when the questionnaire form is displayed on the screen.
- On Change rules are executed whenever users change any value. On Change rules are also executed when a questionnaire is first displayed.
- On Save rules are executed when users attempt to save or complete a questionnaire. Depends on the value of the Validate On questionnaire property.
- On Repeat rules are executed when a new instance of a repeatable group is displayed.
- On Delete rules are executed when an existing instance of a repeatable group is deleted.
- On Can Execute rules configure when a command is available.
- On Execute rules configure what happens when a command is executed.
In the rules editor, add rules and conditions using the toolbar to create your rule script.
- Steps group
- Step – Step is a specific action that can be defined within the condition branch or separately in the rule. Once it is a part of the condition branch, the step begins after its preceding condition is met. To move a step in the rule editor use arrows in the editing line. To delete it, use the delete button in the same line.
- Say text – When the rule condition is fulfilled, a message window with chosen text appears on the user’s screen. This button serves as a means of setting the message text.
- Scan Image – Allows you to initiate barcode scanning or image recognition, resulting barcode or recognized image is saved to a string.
- Variable – define a variable that is added into the Property selector of the rule. This variable will be only used for the specified rule. Remember that you can only use this variable after the step where it was defined. To enter a variable into the workflow after defining it, just click elsewhere the variable editor. To delete it, click on the variable and choose the delete option in the editing line.
- Shared variable – add a variable that covers the entire questionnaire form
- Conditions group
- If – The first condition contains the label “If” and the condition string. The conditional branch consists of the condition and steps that are executed only when the condition is valid. Steps and variables are displayed in the “Then” or “Begin” section. All parts of the rule can be modified or re-ordered using the up and down arrows at the end of the editing line.
- Else – Using this option, otherwise branch of the condition will be added to the actual (selected) condition. The "Otherwise" part of the rule condition prevents the user from experiencing unexpected, incorrect behavior.
- Condition – adds another condition to the same if
- Group And / Group Or – select two or more conditions and choose whether all need to be met or only one of them
- Ungroup – Selected condition consisting of several conditions is divided into separate conditions
See Questionnaire Designer examples for a few sample rules.
Rules version
For each questionnaire, you can define the version of the rules used in the parameter Rules Version on the Properties pane on questionnaire level. This affects the execution of On Change rules.
- In version 1, when a question is changed, all the OnChange rules are executed (the rules defined on root level and also for all groups).
- In version 2, root rules are executed always. Group rules are executed if the question belongs to that group or depends on it. (The On Change rule depends on a question if it uses that question and that question is not a context question of that rule. Context questions of the rule are listed under the Questions property.)
- Version 3 is the first version that supports On Create rules.
- Latest means that the questionnaire will always use the newest version of rules.
Resco mobile apps older than release 13.1 may experience instability when using rules version 2.
When a questionnaire is loaded
The following rules are executed when a questionnaire is loaded:
- For every question of the questionnaire, the On Change rules are executed.
- The IsLoaded property equals false.
- The ChangedItem property equals the name of the question.
- (In version 1, if you had N questions and M groups, the On Change workflow was executed N*(M+1) times in the load phase. It is recommended to use IsLoaded property in On Change rules to speed up the loading process of the questionnaire.)
- The On Load rules for root level and group level are executed once.
- The IsLoaded property is set to true.
When a question is changed
The following rules are executed when a question is changed:
- The On Change rules are executed as described above.
- The ChangedItem property contains the name of the changed question
When a questionnaire is completed
- All On Save rules are executed.
When a repeatable group is repeated
The following rules are executed when a new instance of a repeatable group is created.
- On Change is executed for every question of the group (IsLoaded is set to false)
- On Load of the group is executed.
- On Repeat of the group is executed.
When a repeatable group is deleted
- On Change is executed for every question of the group
- On Delete of the group is executed
Interaction with smart rules
Smart rules are a simplified version of the rules. The process of creating is simplified, however, under the hood, the classic rules are generated. These workflows are stored on a question and are combined at the execution time with On Change rules as follows:
- When the questionnaire loads and the scripts are initialized, the question's smart rules are appended just before the On Change rule. If the question is in a group, the smart rules are appended before the group's On Change rule; if not, the smart rules are appended before the root On Change rule. Group smart rules are always appended to the root On Change.
- The whole smart rule section of the group or root On Change is automatically placed under the condition IsLoaded == true. In this case, the same smart rules are not executed multiple times during the load phase. See section When a questionnaire is loaded.
- In a similar way, the smart rules are appended before the On Load rules and are executed exactly once when the questionnaire is loaded.
Advanced note: The smart value rule that sets the style and score is further encapsulated in the ChangedItem == questionname condition because only that question's value is used in its condition.
Scoring in rules
With questionnaire scoring, introduced in release 13.1, users can react on a change in a score or result in rules. If the score or the result of the questionnaire changes, the root On Change is executed and the ChangedItem is set to Score or Result.
Working with instances of repeatable groups
Use QuestionGroups variable to access a particular instance of a repeatable group. Or you can even work in all instances of a repeatable group in bulk.
- Expand / collapse all instances of a repeatable group
- Check all instances of a repeatable group when saving
Editing styles
You can use hand-crafted styles to customize the design of your questionnaire. Styles apply to question blocks (combination of question and answer).
- To assign styles, select a question and then choose the style on the Properties pane. You can also change this assignment via rules.
- To modify or add new styles, click Styles to open the styles editor.
The designer comes with multiple predefined styles, grouped into two categories:
- Form Styles define how ow the question and answer appear in the app.
- Report Styles define how the question and answer appear in the report.
You can use the toolbar buttons Add or Clone to create new styles. Click Delete to remove styles.
See Style editor for more information.
Report themes
The Questionnaire Designer comes with multiple pre-configured report themes. You can switch between themes using the Report Themes button in the toolbar. Switching to a different theme discards all your custom report styles and resets the built-in styles to the default settings.
Localization
You can add multiple language mutations for your questionnaire templates. App users can answer the questionnaire in their language. In addition to the questionnaires, automatic reports are also localized (in the language of the app).
Take also A closer look. Blog
Adding a new language
- Click Localization.
- Click Add and select a language, then click OK. All localizable strings are displayed.
- Translate all the strings that you need. The following strings can be localized:
- For a questionnaire, the name, description, and result.
- For a question: label, description, on label, off label, option items, single-choice and multiple-choice strings
- For a group: group name
- You can also add custom strings, see here.
- By default, the questionnaire is displayed in the language of the app (configured in Setup/Settings). If your app does not offer the language you need, Woodford administrator must enable the language in the organization; see localization.
Optionally, you can set Language Selection to Selected by User so that users can select from the full list of available questionnaire languages. - Save everything and verify the result in the app.
If you want to have texts translated by a person without access to the questionnaire designer, you can export the localization to a file, have it translated, and import the result back.
Localizing custom strings
In addition to the texts for all the questions and options, you can also define custom strings that can be localized. You can then use these custom strings in rules, for example, to display a custom message to the user, or to modify the form caption (described in the example below).
- Edit a language and click Add custom string.
- As the name, enter the internal name of the string. As a label, enter the text in the default language. Optionally, you can format the string using curly braces, for example,
Hello, {0}.
- Click OK to save the string.
- Add the localized text, then save and close localization.
- Click On Load to add a new rule that changes the form caption to the localized string.
Configuring commands
You can configure commands available in the app when answering a questionnaire. This works similarly to Form commands in Woodford.
- Edit a questionnaire template.
- Click Edit to open the command configuration window.
- Move commands from the Available Commands pane to the Selected Commands pane.
- If a command has multiple options (like Run report), select it and click Properties to configure the available options.
- Click Save & Close.
Tip | See also Buttons, they can be used in similar scenarios as commands. |
Available commands
- Complete and close
- Complete with a report
- Run report
- Cancel the questionnaire
- Clear answers
- View report
You can also create custom commands. Use the rules On Execute and On Can Execute to make the command actually do anything, or you can define the action in a script attached to the questionnaire form.
Configure Run Report command
You can also configure the behavior of the Run Report command. For example, you can control which formats are available (PDF, Word, etc.). See Configure Run Report command for details.
Mobile reports
Resco platform comes with a powerful reports function that allows app users to generate reports on their devices, even offline. See mobile report for more information about reporting in general.
In the case of questionnaires, you can automatically create a mobile report template that mirrors the structure of your questionnaire: start the Report Designer tool, create a new report for the questionnaire entity and select the appropriate questionnaire as your source.
App users have the option to complete questionnaires with a report, or they can generate a report on demand.
See Mobile reports for Resco Inspections for a more detailed discussion of your reporting options in Resco Inspections.
See also
- Resco Inspections - information about the solution
- Resco Inspections (app) - information about the dedicated mobile app
- Inspections - how to enable and configure Inspection features in Woodford
- How AI can automate complex inspections summaries with Resco and ChatGPT Blog