Jump to content

Questionnaire Designer: Difference between revisions

From Resco's Wiki
Line 284: Line 284:
== Editing styles ==
== Editing styles ==


Use styles to customize the design of your questionnaire. Styles apply to question blocks (combination of question and answer).
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 '''assign''' styles, select a question and then choose the style on the '''Properties''' pane. You can also change this assignment via rules.
Line 291: Line 291:
The designer comes with multiple predefined styles. You can use the toolbar buttons '''Add''' or '''Clone''' to create new styles. Click '''Delete''' to remove styles.
The designer comes with multiple predefined styles. You can use the toolbar buttons '''Add''' or '''Clone''' to create new styles. Click '''Delete''' to remove styles.


The list of available styles is displayed in the left pane. The central pane shows a preview of the selected style. The right pane shows all the properties of a style.
See [[Style editor#Questionnaire Designer|Style editor]] for more information.
 
You can modify the following properties:
* Height and background color of the cell
* Font, color, and alignment for the question (label)
* Font, color, and alignment for the answer (value)
* Custom colors for links, buttons, errors, or separator
* Image path and alignment
* Miscellaneous settings
 
Styles are defined separately for each questionnaire template.


[[Category:Resco Inspections]]
[[Category:Resco Inspections]]
[[Category:Resco CRM]]
[[Category:Resco CRM]]

Revision as of 09:20, 22 August 2019

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 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

Accessing the designer

Microsoft Dynamics CRM
Log in to Dynamics, go to Settings, and in the MobileCRM section, select Inspections. On the Inspections page, select Designer.
Resco Cloud
Log in to your organization and select Questionnaire Designer.
Salesforce
TBD

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 bottom 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):

New
Create a new questionnaire or snippet from scratch.
Delete
Permanently delete the selected questionnaire or snippet.
Clone
Create a copy of the selected item. You are prompted to enter a new name for the duplicate.
Edit
Open the selected item for editing.
Activate
Mark a questionnaire as active. Only available for questionnaires in inactive or draft state.
Deactivate
Mark the selected questionnaire as inactive.
Associate
Use this function to add or remove entities to which the questionnaire should be associated. See also this blog post. Blog
Import
Select a .qbuilder file and import it.
Export
Export the selected questionnaire or snippet in XML format (.qbuilder file).
Demo Data
Import sample questionnaires.

Editing a questionnaire

Main toolbar

Main toolbar is in the top section of the application. These are the commands available on the main toolbar.

Edit group
  • Save – Saves the questionnaire
  • Save & Close – Saves the questionnaire and returns user to the home screen.
  • Clone – Clones/duplicates the selected component
  • Delete – Deletes the selected component
Organize group
  • Move Up – Moves up the selected component
  • Move down – Moves down the selected component
  • Collapse All – Collapses all components in the central pane and in the Questions pane
  • Expand All – Expands all components in the central pane and in the Questions pane
  • Multiselect - Allows you to select multiple components. You can use the selection for example to create a snippet.
Snippets
  • 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.
Preview
  • Preview BETA - Previews the questionnaire in your browser. Rules are ignored in preview mode.
Rules group
(variant when group is selected)
  • Edit On Load Rules – Rules executed when the user starts filling out the questionnaire
  • Edit On Save Rules – Rules executed when user completes the questionnaire
  • Edit On Change Rules – Rules executed each time a value of a question is changed by the user
  • Edit On Repeat
  • Edit On Delete
Rules group
(variant when other component is selected)
  • Edit On Load Rules – Rules executed when the user starts filling out the questionnaire
  • Edit On Save Rules – Rules executed when user completes the questionnaire
  • Edit On Change Rules – Rules executed each time a value of a question is changed by the user
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.

Questions pane

The Questions pane shows a chronological list of components within a questionnaire, similar to a table of contents. Selecting a component in the Questions pane also selects it in the main central pane and displays component's details in the properties pane on the right. For longer questionnaires, you can collapse groups for additional 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 its 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 user filling the questionnaire template.

Component Description
Description Adds a section for describing questions, questionnaire sections or for providing any other information for 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.
Image Adds a section with a static image on a questionnaire template. It is possible to set the label and description of the image.

Input components

Input components are components used to set up questions of many kinds.

Component Description
Text Adds a question type of a single line of text
Multiple Lines of Text Adds a question type of Multiline text on a questionnaire template
Single Choice Adds a question with multiple answer options on a questionnaire template. User can only select one of the available answers
Multiple Choices Adds a question with multiple answer options on a questionnaire template. User can select multiple available answers.
Whole Number Adds 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 Adds 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. User can also specify precision for the input that represents the number of decimal digits.
Checkbox Provides user with a switch between two values. User can set the label for each.
Option Set It's similar to the Single Choice component, but each label has also a set index, according to which it can be searched.
Date adds a field on questionnaire template to enter date data.
Date and Time Adds a field on questionnaire template to enter the date and time
Lookup Adds a field on a questionnaire that serves as LookUp on entity/entities. User creating template has to select target entities. Records of those entities will be then available in the application for user to select.
Image Adds a question that requires a picture as an input. Image is stored as Note image.
Signature Adds an input for the signature. Signature is stored as Note image.
Email Adds an input for the email address.
URL Adds an input for a specified URL.
Barcode Adds a way to scan a barcode.
HTML

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.

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, properties of the component are displayed on the right side of the window.

Basic properties:

  • Id – Each component has its own unique ID. User 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:

  • Status - Active, draft, or inactive. This cannot be changed on the Properties pane, use the Activate / Deactivate buttons instead.
  • Answer Storage - Select how should the answers be stored:
    • Records: This is the default option. Each answer is transferred as a single record during synchronization. This may make synchronization slower, but ensures the best compatibility with the back-end servers and allows you to leverage existing tools to visualize the data.
    • JSON or Compressed JSON: These options offer improved synchronization performance, however, not all tools understand JSON.
  • 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.

Properties on Question level:

  • Style – User can choose from the offered component styles
  • Required – when enabled, component is mandatory.
  • Show on report - when enabled, component is visible on the report.
  • Visible – when enabled, component is visible.
  • Filter - for lookup questions, you can set up filter the available records or change the sort order.
  • Format – some components offers the additional option to select desired format.

Properties on Group level:

  • Repeatable – property of question group, which defines min and max possible number of repeating the group.
  • Expanded
  • Min Repeat Count
  • Max Repeat Count
  • Copy Values

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 Questions pane or in the central pane.
  • To move component to a different location, click the button in the top left corner of each 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 or change the Visible property on the properties pane.
  • To mark a question as mandatory, click the exclamation point (!), or change the Required property on the properties pane.
  • To create a duplicate of a components, click Clone.
  • To delete a component, click the x button in the top right corner of a component.

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.

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 the question group B between questions with indexes 2 and 3, but it is possible to place the question group B instead of question group A, changing its position within the question group section.

Editing rules

Rules describe sequences of steps that are executed when the 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 Load rules are executed when users start to fill out the questionnaire.
  • On Change rules are executed whenever users change any value. On Change rules also executed when you a questionnaire is displayed.
  • On Save rules are executed when users complete a questionnaire (just before).
  • 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.

In the rules editor, add rules and conditions using the toolbar to create your rule script.

Steps group
  • Step – Step is a specific action which 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 means of setting the message text.
  • 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 which covers the entire questionnaire form
Conditions group
  • If – The first condition contains label “If” and the condition string. Conditional branch consists of the condition and steps that are executed only when 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. Otherwise part of the rule condition prevents 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

Example: Automatically fill fields (On Load rule)

You might want that some fields are automatically filled in when a user starts the questionnaire.

  1. Open On Load rule editor on a questionnaire.
  2. Set up a rule with the following logic:
    1. Add the condition If the questionnaire is new.
    2. Add Step: For the question Date and Time set the value to now.
    3. Add Step: For the question Filled by set the value to the current user.
  3. Save the rule, questionnaire, and test it in the application.

Example: Show additional question depending on previous answer (On Change rule)

When a user answers a question in a certain way, you might want to display additional questions. For example, married users need to provide the name of their partner.

  1. Create a group with two questions:
    • A single choice question: Are you married? (Answers: Yes, No.)
    • A text question: Partner name. Invisible by default
  2. Select the first question and click On Change.
  3. Set up a rule with the following logic:
    1. Add the condition If: If the answer to the are-you-married question is Yes.
    2. Add Step: Then set visibility for the question partner-name to True.
    3. Add Else.
    4. Add Step: Else set visibility for the question partner-name to False.
  4. Save the rule, questionnaire, and test it in the application.

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. You can use the toolbar buttons Add or Clone to create new styles. Click Delete to remove styles.

See Style editor for more information.