Pular para o conteúdo principal

FV Decipher Support

Todos os tópicos, recursos necessários para FV Decipher.

Base de Conhecimento da FocusVision

Reusable Answer List Element

This document describes the Reusable Answer List in the survey editor.

Overview

The Reusable Answer List is a structural element that allows you to save the answer options you create within one survey question for use in other questions.

1: Adding a Reusable Answer List in the Survey Editor

1.1: Creating the Reusable Answer List

To add a reusable answer list within the survey editor, you will first need to create your list. You can create a list by adding the Reusable Answer List structural element, or by copying answer options ifrom an existing survey question.

1.1.1: Adding the Reusable Answer List Element

To create a reusable answer list using the element, click "Structural" in the Element Menu, and select "Reusable Answer List". Then click "Insert":

1.1.2: Copying Answer Options from an Existing Question

To create a reusable answer list with options you are already using in a survey, simply go to the question element with the desired response list and click "Create Reusable Answer List" from the "Row Actions" drop-down:

In the list creation module, enter a name for your reusable answer list, select all of the answers you would like added to your list, and then click "Create":

Note: If answer options are listed in a group, all of the answers within the group will be included in your selection. Likewise, all selections must be contiguous.

1.2: Viewing the Reusable Answer List

Once created, your reusable answer list will appear in the element tree, and you can click on the list name to review it at any time.

The Reusable Answer List element will include the following details:

  1. Name: The name of your reusable answer list, which will appear in the element tree and in the list selection drop-down menu.
  2. Save to Library: Adds the reusable answer list to your company element library.
  3. Answer Actions: A drop-down menu displaying the options available for customizing your answer content.
  4. Answers: The responses included within your reusable answer list. You can edit these responses just like you would for any other survey element. Click here to learn more about editing response options in the Survey Editor.
  5. New Answer: Adds a blank row for inputting an additional answer option.
  6. Linked Elements: Displays links to each question that utilizes the reusable answer list. You can use these links to quickly navigate between questions sharing the reusable answer list.
  7. Previously Linked: Displays links to each question that previously utilized the reusable answer list. You can use these links to quickly add the reusable answer list back to questions you may have unlinked during editing.

1.3: Linking the Reusable Answer List to a Question

Once you have added a reusable answer list, you can start adding it to questions within your survey by linking them to the list element. To link a question to a reusable answer list, click "Insert Reusable Answer List" in the "Row Actions" drop-down for that question:

Note: The Reusable Answer List element must exist above the element that uses it.

Then select the desired list element from the drop-down and click "Insert":

Once inserted, all of the responses from your reusable answer list should appear in the target question, along with options to either edit or unlink the list from the question:

These options will have the following effects:

  • Edit: redirects you to the reusable answer list element, where you can edit the answer options for all questions linked to the list element.
  • Unlink: keeps the answer options but unlinks the question from the reusable answer list, allowing you to make changes to answers in the current question without affecting any other questions linked to the reusable answer list element.

Note: Once questions are unlinked, they will not reflect any changes made within the Reusable Answer List element. Be sure to re-insert answer lists for any questions you would like tied to the reusable answer list after making question-specific changes.

1.4: Editing the Reusable Answer List

You can edit your reusable answer list in the same way that you would other question elements, and any changes you make to the "Answers" rows will be applied to all questions linked to the reusable answer list element (those listed under "Linked Elements"):

1.5: Limitations

The Survey Editor does not include options to:

  • Exclude answers when inserting a reusable answer list.
  • Specify which attributes to strip; however, it does automatically attempt to add values for the user.
  • Reference the answer list options in a loop source; however, the options can be added manually.

2: Adding a Reusable Answer List in the XML Editor

Reusable answer lists require two XML elements: the <define> tag, which is the template for the list, and the <insert> tag which is added to the element that will display the answers. The <define> tag must be declared before being used, and only one <insert> tag is allowed per answer axis per element using the Survey Editor.

2.1: Required Elements

2.1.1: The <define> tag

The following attributes can be used with the <define> tag:

  • label (string) - the unique identifier
  • builder:title (string) - text used for name of element in survey builder
  • builderHint (string)  - the list of elements that previously contained an <insert> referencing this element

Additionally, the <define> allows use of the following children:

  • <row>
  • <group>

2.1.2: The <insert> tag

The following attributes can be used with the <insert> tag:

  • source (label) - the label of the <define> to insert
  • as (ienum/rows,cols,choices) - the cell type to non-group cells as. Default: rows
  • exclude (slist) - list of cell labels to exclude
  • strip (slist) - list of attributes to strip from the expanded cells

Example

The code below illustrates how to insert a reusable answer list to target question "q1" as rows and to question "q3" as columns. The "q3" column also uses the new option reverse for values:

<define label="p1" builder:title="Brand list 1" builderHint="{&quot;unlinked&quot;:[]}">
 <row label="p1r1">Brand 1</row>
 <row label="p1r2">Brand 2</row>
 <row label="p1r3">Brand 3</row>
 <row label="p1r4">Brand 4</row>

</define>

<checkbox 
 label="q1"
 atleast="1"
 shuffle="rows">
 <title>Which of these Brands have you heard off?</title>
 <comment>Select all that apply</comment>
 <insert source="p1"/>
 <row label="r5" exclusive="1" randomize="0">NA</row>
</checkbox>

<suspend/>

<checkbox 
 label="q2"
 atleast="1"
 rowCond="q1[row.index]"
 shuffle="rows"
 shuffleBy="q1">
 <title>Which of these Brands have you used?</title>
 <comment>Select all that apply</comment>
 <insert source="p1"/>
 <row label="r5" cond="1" randomize="0">NA</row>
</checkbox>

<suspend/>

<radio 
 label="q3"
 averages="rows"
 grouping="cols"
 shuffle="cols"
 type="rating"
 values="reverse"
colCond="q2[col.index]">
 <title>Please rate these Brands</title>
 <comment>Select one for each option</comment>
 <exec>
q3.cols.order = q1.rows.order
 </exec>
 <insert as="cols" source="p1"/>
 <row label="r1">Excellent</row>
 <row label="r2">Very good</row>
 <row label="r3">Good</row>
 <row label="r4">Fair</row>
 <row label="r5">Poor</row>
</radio>

2.2: Limitations

The following limitations apply to any reusable answer lists created using XML:

  • <define> attributes are not allowed within <loop> tags.
  • Labels are not changed when inserting tags into a different axis; however, you can use onLoad to modify this.

The code below will only work in a non-secure survey environment.  

Example

<define label="p1" builder:title="Brand list 1" builderHint="{&quot;unlinked&quot;:[]}">
 <row label="p1r1">Brand 1</row>
 <row label="p1r2">Brand 2</row>
 <row label="p1r3">Brand 3</row>
 <row label="p1r4">Brand 4</row>
</define>

<radio label="q1" onLoad="for x in ctx.el.cols: x.attr['label'] = 'c%s' % (x.index + 1)">
   <title>Some Cols...</title>
   <insert source="p1" as="cols"/>
</radio>