Skip to main content

Decipher Support

All the topics, resources needed for Decipher.

FocusVision Knowledge Base

Autosum Element

Overview

The Autosum element is an open-end type question which allows respondents to enter numeric values in multiple text-boxes and keeps a running total of those values. The sum of all rows or columns is displayed below those input fields and is updated in real-time as the respondent enters values.

The following example highlights the Autosum style:

dec_autosum_001.png

Adding an Autosum Element

To add an Autosum, click "Add Survey Element", select "Standard", and click "Autosum" Then click "Insert":

dec_autosum_002.png

Configuring the Element

Basic Settings

Once inserted, you can add the question and instruction text, as well as the rows and/or column options for your element:

dec_autosum_003.png

Additionally, you can change the element's style, save it to the Element Library, or preview it in the survey. Click here to learn more about adding and editing basic element settings.

Question Options

The element's question options will appear to the right of the question staging area. Click anywhere in the element to set rules for the question:

dec_autosum_004.png

  • Label: The label assigned to the element. You may edit the default label for the number element here.
  • Type: Displays the element type. You may change the element type to single-select, multi-select, select or text.
  • Show If: Allows you to create new logic conditions or select an existing logic condition for the element. For more information, click here.
  • Languages: Select what languages the element will show in if the survey has multiple languages. The default is "all languages."
  • Mandatory: When checked this option will force respondents to provide a response. The respondent will be unable to continue the survey without completing the question.
  • Randomize: Show answer options in random order. Check rows, columns, and/or groups to randomize.
  • Allow Decimals: This option allows decimal entries in the numeric field.
  • Value Range: This option assigns a value range for the each open end number field in the question. For example, "1-200" will only allow the respondent to enter numbers 1-200 in each open end number field.
  • Validate Sum: This option is only available if the question has both rows and columns. Any value entered here will force the numeric sum of each row or column (based on what the question is "grouped by") to be exactly equal to this value.
  • More Options: Use the drop down menu to select less commonly used options. Once selected, you will be able to specify the setting for that option. For more information on each option, click here.
  • Raw Options: If you prefer to manually enter the XML options, use the "Raw Options" dialog. This is useful for copying and pasting options between survey elements.

Response Options

The element's row and column response options will also appear to the right of the question staging area. Click into a row or column text-box to set options for that specific response:

2015-12-30_12-53-05.png

  • Label: The label assigned to the row. You may edit the default label for the row here.
  • Data Value: The value assigned to the row in the data. You may edit the default value for the row here if the option is available.
  • Show If: Allows you to create new logic conditions or select an existing logic condition for the row. For more information, click here.
  • Languages: Select what languages the row will show in if the survey has multiple languages. The default is "all languages."
  • Do Not Randomize: This option is only available if the "Randomize" general option is selected. Checking this box will force the line to remain stationary.
  • Optional: This option is only available if the "mandatory" general option is selected. When checked it will allow for the row to become optional and non-mandatory.
  • Open End*: Allows you to add an open end response box to the row by selecting "mandatory" or "optional" from the dropdown menu. "Mandatory" means the respondent must enter feedback in the response box to continue if the row is selected, "optional" means that feedback is not required.
  • Hidden: This option will hide the row from respondents.
  • Validate Sum: This option is only available if the general option "group by" is set to rows. This option will force the respondent to enter a number equal to or less than the value entered here.
  • No Answer*: This option will replace the open end number field with an exclusive checkbox form. It is primarily used if there is a "Don't know" or "None of these" answer choice in the question.
  • Form Pre-Text*: Text/symbol entered in this field will appear before the answer field.
  • Form Post-Text*: Text/symbol entered in this field will appear after the answer field.
  • More Options: Use the drop down menu to select less commonly used options. Once selected, you will be able to specify the setting for that option. For more information on each option, click here.
  • Raw Options: If you prefer to manually enter the XML options, use the "Raw Options" dialog. This is useful for copying and pasting options between survey elements.

The options marked with an asterisk (*) are only available for rows and will not appear in the response options for columns.

You can preview the element at any time by clicking on the "Preview" link located at the top right corner of the element. To find out more about previewing an element, click here.

Adding Autosum via the XML

The following information can be used to modify the question style in the survey XML.

The underlying question type for autosum is a "number" question.  To apply the autosum question style to a number question, add uses="autosum.5" to the question tag.

Customization

  • Form pre-text (autosum:preText)
    • The text or symbols to the left side of the answer field.
    • Can be applied on row or col tag (depending on grouping).
    • Type="string"; Default: Blank.
    • Example -- autosum:preText="$"
  • Form post-text: (autosum:postText)
    • The text or symbols to the right side of the answer field.
    • Can be applied on row or col tag (depending on grouping).
    • Example -- autosum:postText="%"
  • Autosum pre-text: (autosum:sumPreText)
    • The text that appears to the left side of the sum indicator.
    • Can be applied on row or col tag (depending on grouping).
    • Type="string"; Default: "Total:."
    • Example -- autosum:sumPreText="Total:"
  • HTML color: (autosum:color)
    • Sets the color of the autosum indicator when the sum does not meet the required amount. Enter the hex color code or valid CSS color name.
    • Can be applied on row or col tag (depending on grouping).
    • Type="string"; Default: "red."
    • Example -- autosum:color="red"
  • Pre-fill answer field: (autosum:prefill)
    • The number the answer fields are pre-filled with.
    • Can be applied on row or col tag (depending on grouping).
    • Type=”string”; Default: Blank.
    • Example -- autosum:prefill="0"
  • Show remaining: (autosum:showRemaining)
    • When using autosum:showRemaining="1" the autosum indicator will start with the required total and calculate the remaining amount.
    • Can be applied on row or col tag (depending on grouping).
    • Type="bool"; Default: false or 0.
    • Requires: "validate sum" in Builder question options or amount="" on question tag in XML.
  • Legend position: (autosum:legendPosition)
    • The position of the autosum legend in the answer grid. Options include "top" or "bottom."
    • Type="string"; Default: "bottom."
    • Requires grouping="cols."
  • autosum:disabled
    • Disable summing for a particular column, row or question (depends on grouping). 
    • Type="bool"; Default: 0.
  • autosum:amount
    • The threshold the amount must reach to return autosum:color back to the default color.  During summing, the sum color is displayed in "red" color (see autosum:color above). 
    • Can be applied on row or col tag (depending on grouping).
    • This can be used to match the sum of a previous question.
    • Type="string"; Default: amount="" if not overridden by autosum:amount.
  • Was this article helpful?