Best practices - Question types

Applies to Infiniti v9.0 or later
 
This section describes standards to apply to individual question types in the design of your templates. Some of the standards suggested may depend on circumstances and should be decided early when building a new template to avoid rework later.
 
While there is flexibility in how and when questions can be used, it is recommended that each question type is used for their intended purpose. For example, a label question type can be used to execute formulas or used as condition parents, but this is not the intended use of the question. Over-use of this question in this way can result in performance degradation of the project.

Answer Names

You should always change the default answer name text to something meaningful. Do not leave the default.
 
For example, ‘Full Name’ is more descriptive than ‘New Answer 1’.
 
Although it is important to name answers, it’s also important to note that answer names may be included in question references (i.e: [YourAnswerName]), and so you must be careful to avoid the following elements in your answer names:
 
  • Special characters that may cause issues in question references. Avoid using any non-alpha-numeric characters except underscore (_), hyphen (-), space ( ), or colon (:). In particular, never use vertical bar (|) or square brackets ([ or ]).
  • Duplicate answer names should be avoided as they create ambiguity.

Text Field

The Text Field question is the most commonly used question type within a form. You are provided with a basic text box to type a response to a question or instruction.
 
Question Text
This is the text visible in Produce (the wizard) and should be written consistently; if you phrase the text as a question with a question mark, you should do this consistently throughout.
 
For example, ‘Name’ as the question text versus ‘What is your name?’
 
Note: Which style is appropriate may differ based on the situation, and should be consistent and appropriate within each template.
 
Answer Name
Generally, this should be the concise version of the question text, for example ‘Name’ could be the answer name for ‘What is your name?’ If you require multiple format strings, you will require more than one answer. Each answer name should include a brief description of the format string.
 
For example, ‘Order Date: short date’.
 

Variable

Variable questions provide a way to retrieve information from the user’s profile or calculate values from data collected in the question set.
 
Question Text
This should be a label describing the purpose of the variable question, representing the answers it contains. This is not displayed to any users, so you can be descriptive to help ‘document’ the questions use for other designers.
 
For example, ‘User Details’ is a good label to apply to a variable question that’s primary purpose is to supply the template with information about the current user. Avoid generic labels for variables, such as ‘My Variables’ as this does not indicate its purpose. If there a mixed purpose of individual answers, consider separating into different variable questions.
 
Answer Name
This is a representation of the Variable field which should indicate its data purpose or formula.
 
For example, ‘First Name’ or ‘Employee Age’.
 

Data Source

 
Data source questions retrieve records, or rows, from an external source such as a database table, view, stored procedure, XML data source, Web Service, or other data system or line of business application.
 
Question Text
If the data source question is visible to the user for data selection, ensure the question text is consistent with other question styles in your template and provide as much information as needed for the user to make an appropriate selection.
 
For example, ‘Please select a customer below’.
 
If the data source is invisible to the user the question text should be a concise summary of the table/view your data source is connecting to.
 
If the actual table/view name is obscure ensure you include a more descriptive label in the question text.
 
For example, ‘Customer Details’ rather than ‘TBL0113’.
 
Answer Name
This should be the full name of the corresponding data field itself. If you are doing any data conversion or formatting, you should always include an indication of this in the answer name. This is especially important to avoid problems with question references to these answers, as the name should be unique from the data field name.
 
For example, an unformatted field named ‘FullName’ may be given the answer name ‘Full Name’, however a converted/formatted field ‘DateOfBirth’ should be given an answer name such as ‘Date of Birth: date’ to indicate it is converted to an actual date format.
 

Label

 
The label question does not require end user interaction, and is intended to display text and images in Produce. Labels should be used as a means of displaying a contextual information to end users, or to retrieve query string attributes (launch.aspx) and not used to perform formulas or used as condition parents.
 

Label / Invisible Label

 
Labels have been designed to display information (html/text/images) on screen to end users within a web form, or used as ‘placeholders’ to retrieve data from the query string (launch.aspx).
 
Note: Overuse of labels to execute conditions or formulas is not recommended and will slow the performance of your form. Another key point, is that labels work differently when set to visible vs. invisible. If a label is invisible it does not notify child questions that there is a change, which can cause logic to appears as though it is not working, for example: references, filters, formulas, and conditions set on child questions might not update on the same page, next page, or form load. The recommended approach is to use the variable question to calculate results or act as parent questions.
 

Label Name

 
This is the label’s title, and by default, is not displayed. If you choose to display to the user, treat this as the heading for the label and make it consistent with other question text or label titles. If it’s to remain invisible, the title should be descriptive of the purpose of the label, e.g. ‘Page Instructions’.
 
Label Text
The actual label value that is displayed in Produce.
 
Answer Name
This should be identical to the Label Name.
 

Multiple Choice

 
Group logic questions allow end users to choose between a fixed number of options from a list, and can be displayed in a number of ways to the end user such as buttons, drop downs and option lists. Can be used as Condition Parents.
 
Question Text
This is the text visible in Produce and should be consistent with the question style used throughout the template.
 
Answer Name
This should be identical, or very similar to the Display Text. Remember to drop any special characters that might be in the display text, such as square brackets.
 
Display Text
This is the text visible in Producer for each specific answer.
 

Auto Logic

 
The auto logic question is an invisible question type used for inserting or excluding content or formatting text based on a set of rules. These rules can refer to selections made in the question set, formulas, or values retrieved from data sources.
 
Question Text
This should be a label describing the purpose of the auto logic question, representing the answers it contains. This is not displayed to any users, so you can be descriptive to help ‘document’ the question’s use for other designers.
 
For example, ‘Clause Logic’ is a good label to apply to an auto logic question that’s primary purpose is to define rules on whether some clauses are included or excluded from the document. Avoid generic labels for auto logic, such as ‘My Auto Logic’ as this does not indicate its purpose. If there is some mixed purpose of individual answers, consider separating into different auto logic questions.
 
Answer Name
The answer name should be descriptive of the rules defined in the answer. This should be as concise as possible.
 
For example, ‘Disclaimer Clause’ is a good name for an answer that defines rules on whether to include the disclaimer clause.
 
Rather than have an additional Auto Logic question for each rule, add additional Auto Logic Answers to the Auto Logic question as shown below. Only related Auto Logic Answers should be grouped together.
 

Related Articles

Best practices - Template design
 

Keywords