The following list of functions have a variety of uses, including controlling input, conditioning content dynamically, altering an input element's enabled and disabled states, and more.
addSeparators
Use the addSeparators
method to reformat a number value with comma separators. This is a corollary to the number format
tag. Where number format
acts on values in real time as digits are entered by respondents into fields, addSeparators
retroactively adds comma separators to a number already captured.
autocalc
The autocalc
tag and script is used to update a text field dynamically based on a mathematical expression. The mathematical expression can include basic operations such as addition, subtraction, multiplication, and division, or nearly any expression using Javascript mathematical operations. In the mathematical expression, you can reference individual variables from the survey.
contains
The contains
function is a Boolean expression in which a specified collection of values is searched for a given single value. If the single value is found within the collection, contains
evaluates to "true." If it is not found, contains
evaluates to "false". The notContains
tag is the opposite: if the value is found, it evaluates to "false." If it is not found, it evaluates to "true." Both functions work anywhere Perl is accepted.
fetch_cell and fetch_row
Spreadsheets are a convenient way to store large lists with arbitrary data. To quickly and easily reference this data, IntelliSurvey has two specialized functions: fetch_cell
and fetch_row
. Each allow you to reference certain parts of a spreadsheet, with function-specific syntax.
get_answer
The get_answer
method is used to access a question response, so that it may be used to fill a field or display a value.
Get Counts
get counts
is a tool which allows survey programmers to look up the number of completed survey records with responses for a given question or variable options.
get_order
The get_order
function returns the string stored in a ordered widget's system-generated order_*
variable These strings are comma-separated numbers where each number refers to an element's original position in the list.
getParm
getParm
is a method of capturing URL parameters. It is used within a variable which must be placed on the first page of a study. getParm
looks at the survey entry URL to find the parameters it will use to populate data in the variable in which it is placed. It works for both closed and open end data, and can be used many times on the same page within different variables to capture all necessary parameters from a survey link URL.
matchto and derivefrom
The match to
and derive from tags are streamlined implementations of fetch_cell
and fetch_row
. They use less verbose syntax, and are therefore easier to read and write. In cases where data is to be pulled in from a spreadsheet, as in a ZIP code look-up, these are the best tools to use. These tags work as a pair. The match to
tag initiates the spreadsheet reference, and derive
from
enables specific fields to be referenced.
none
A Perl function. Logically the negation of any
. Returns "true" if no item in LIST meets the criterion given through BLOCK.
order() method
The order() method allows programmers to define an order utilizing ranges and brackets in a standalone custom ordering variable.
Perl package functions
Returns "true" if all items in LIST meet the criterion given through BLOCK.
Quota look ahead
The quotaOpen
function checks to see if a specific quota bucket is capped in the Quota Manager and returns "true" if open or "false" if the maximum has been met.
url_param
Reads in data stored in URL parameters in the invite link the respondent used to enter the survey so it can be stored in the survey's data.
Comments
0 comments
Please sign in to leave a comment.