Lighthouse Studio

More Detail on Boolean (True/False) Functions

Some functions in Lighthouse Studio are Boolean (true/false) functions that do not return a specific "value".  They simply evaluate to true or false.  You can use the syntax "not" prior to the Boolean function (as shown in the examples below).

 


ANSWERED

 

ANSWERED is true if the question was answered by the respondent.  Note that ANSWERED evaluates to false if the respondent did not ever see the question (use SHOWN if you are interested in whether the question was seen).

 

The format is:

 

 Answered(QuestionName)

 

For example, you may specify a skip in Lighthouse Studio that executes if the following is true:

 

 Answered(Q1)

 

In other words, skip if Q1 was answered by the respondent.  You could also execute a skip if Not Answered(Q1), which would execute if Q1 was not answered.

 

For questions with multiple responses such as Free Format or Grid the full variable name must be specified.  For example Answered(G1_r1) will test whether or not the first row of radio buttons was answered in a Grid question. Answered(G1) will not work.

 

Note: Multi-Select and Constant Sum questions are exceptions to these rules. Multi-Select (Check-box) questions, if ever displayed to the respondent are always considered "answered," with a value of 1 or 0.  Similar with Constant Sum.  If the Constant Sum is answered all entries left blank are filled with zeros in the data record and thus are considered answered.

 


ISNUMBER

 

ISNUMBER is true if the entire string is made up of numeric values (0 to 9), false otherwise.  For example, the string "01605" contains only numeric characters.

 

The format is:

 

 IsNumber(QuestionName)

 

For example, you may specify a skip in Lighthouse Studio that executes if the following is true:

 

 IsNumber(Q1)

 

In other words, skip if the respondent's answer to Q1 contains only numbers.  You could also execute a skip if not IsNumber(Q1), which would execute if Q1 contained characters other than numbers 0 to 9.

 


JAVASCRIPT

 

JAVASCRIPT is true if the respondent's browser has JavaScript enabled, false otherwise.

 

The format is:

 

 JavaScript( )

 

For example, you may specify a skip in Lighthouse Studio that executes if the following is true:

 

 JavaScript( )

 

In other words, skip if the respondent's system has JavaScript enabled.  You could also execute a skip if not JavaScript( ), which would execute if the respondent's browser did not have JavaScript enabled.

 


LISTHASPARENTMEMBER

 

LISTHASPARENTMEMBER is true if the specified parent member exists in the specified list, false otherwise.

 

The format is:

 

 ListHasParentMember(ListName, ParentMember#)

 

For example, you may specify a skip in Lighthouse Studio that executes if the following is true:

 

 ListHasParentMember(BrandAwareList, 12)

 

In other words, skip if the constructed list named BrandAwareList contains item #12 (from the original predefined parent list for BrandAwareList).  You could also execute a skip if not ListHasParentMember(BrandAwareList, 12), which would execute if the BrandAwareList did not contain item #12.

 


SHOWN

 

SHOWN is true if the question was seen by the respondent, or false if the question was not seen by the respondent.

 

 

The format is:

 

 Shown(QuestionName)

 

For example, you may specify a skip in Lighthouse Studio that executes if the following is true:

 

 Shown(Q1)

 

In other words, skip if Q1 was seen by the respondent (did not need to be answered).  You could also execute a skip if Not Shown(Q1), which would execute if Q1 was not seen by the respondent.

 

For questions with multiple responses such as Free Format or Grid the QuestionName parameter above can be either the root name or the specific variable name.  For example if you have a grid question named G1 you can call shown with G1 or with a specific variable such as G1_r3. Shown(G1) will return true if they ever saw any part of G1 (G1_r1, G1_r2, etc.). Shown(G1_r3) will return true only if they saw row 3 of G1 (could have been removed by a constructed list).

 

Created with Help & Manual 8 and styled with Premium Pack Version 4 © by EC Software