Skip to main content

Decipher Support

All the topics, resources needed for Decipher.


FocusVision Knowledge Base

Group Tag: Group Answer Options

1:  Overview

The <group> element is used to create sets of answer options that are visible to respondents in the survey. For example:

  <title>Which of the following artists do you listen to?</title>
  <group label="g1" builder:axis="row">Rock</group>
  <group label="g2" builder:axis="row">Rap</group>
  <group label="g3" builder:axis="row">Country</group>
  <group label="g4" builder:axis="row">Techno</group>
  <group label="g5" builder:axis="row" randomize="0"/>
  <row label="r1" groups="g1">Boston</row>
  <row label="r2" groups="g1">Journey</row>
  <row label="r3" groups="g2">Kanye West</row>
  <row label="r4" groups="g2">50 Cent</row>
  <row label="r5" groups="g3">Tim McGraw</row>
  <row label="r6" groups="g3">Garth Brooks</row>
  <row label="r7" groups="g4">Avicii</row>
  <row label="r8" groups="g4">Skrillex</row>
  <row label="r9" groups="g5" exclusive="1" randomize="0">None of the above</row>

The code above produces the following result:

The <group> element is not compatible with Offline Surveys.

The <group> element should not be used to net responses in the report. Use a <net> tag instead.

If we wanted to create nets of these groups in the report, we could add the following code to our example above:

  <net labels='r1,r2'>Rock</net>
  <net labels='r3,r4'>Rap</net>
  <net labels='r5,r6'>Country</net>
  <net labels='r7,r8'>Techno</net>

This creates the following table in the report:

Learn more aggregating data with the Net Tag.

2:  Attributes

In addition to the Element Attributes available, the <group> element has access to the following attributes:

2.1:  label - Set the Group Name

The label attribute is the unique identifier for the <group> element.

This is used to reference which group each <row>, <col> or <choice> element belongs to. For example:

<radio label="Q1" optional="0">
  <title>Please select one:</title>
  <group label="g1">Group 1</group>
  <group label="g2">Group 2</group>
  <row label="r1" groups="g1">Row 1</row>
  <row label="r2" groups="g2">Row 2</row>
  <row label="r3" groups="g2">Row 3</row>

Each <row> element is assigned to a group by associating the <groups> attribute with the group's label.

2.2:  groups - Set the Group's Parent Groups

The groups attribute controls which group the <group> element belongs to. This is used for creating hierarchical groups, but will not be shown to respondents. For example:

<radio label="Q1" optional="0">
  <title>Which of the following cities have you visited recently?</title>
  <group label="g1">South</group>
  <group label="g2">North</group>
  <group label="g5" groups="g1">LA County</group>
  <group label="g6" groups="g1">Orange County</group>
  <group label="g7" groups="g1">San Diego County</group>
  <group label="g8" groups="g2">San Francisco</group>
  <group label="g9" groups="g2">Sonoma County</group>
  <row label="r1" groups="g1">Los Angeles</row>
  <row label="r2" groups="g1">Hollywood</row>

2.3:  aggregate - Control Data Aggregation

The aggregate attribute is a boolean value that controls the calculation of aggregate information.

If aggregate="0" is specified, aggregate information for that group will not be calculated.

2.4:  percentages - Display Percentages in Report 2010

The percentages attribute is a boolean value that controls the display of percentages in Report (2010).

If percentages="0" is specified, percentages will not be displayed for that group.

2.5:  builder:axis - Set the Group Orientation

The builder:axis attribute can be set to "row", "col" or "choice" and is automatically added by the survey builder to indicate which dimension the <group> element belongs to.

If builder:axis="row" is specified, then the group will be shown as an entire row legend. If builder:axis="col" is specified, the group will appear as an entire column header. If builder:axis="choice" is specified, the group will appear in the drop down menu of a <select> question.

3:  Example

See below for an example where groups are applied to all answer options available (e.g. row, col and choice):

<select label="Q1" optional="0">
    Group Demonstration Question
  <group label="g1">GROUP 1</group>
  <group label="g2">GROUP 2</group>
  <group label="g3">GROUP 3</group>
  <group label="g4">GROUP 4</group>
  <group label="g5">GROUP 5</group>
  <group label="g6">GROUP 6</group>
  <row label="r1" groups="g1">ROW 1</row>
  <row label="r2" groups="g2">ROW 2</row>
  <row label="r3" groups="g2">ROW 3</row>
  <col label="c1" groups="g3">COL 1</col>
  <col label="c2" groups="g4">COL 2</col>
  <col label="c3" groups="g4">COL 3</col>
  <choice label="ch1" groups="g5">CHOICE 1</choice>
  <choice label="ch2" groups="g6">CHOICE 2</choice>
  <choice label="ch3" groups="g6">CHOICE 3</choice>

The code above produces the following result:

4:  What's Next?

Learn more about Adding Groups using the survey builder.