Lighthouse Studio

List Functions

 

Sawtooth Script:

Description:

ADD (ListName)

ADD (ListName, Member#)

ADD (ListName, StartMember#, EndMember#)

Adds members from a specified list to the end of the constructed list.

More info.

AddSorted (QuestionName)

AddSorted (QuestionName, Direction)

 

Adds members rated/ranked within a multi-part radio/rank/numeric question to a constructed list, in ascending or descending order.  Specify a 0 for Direction to indicate descending order; specify 1 for ascending order.

AIC (QuestionName)

AIC (QuestionName, Member#)

AIC (QuestionName, StartMember#, EndMember#)

Add If Chosen: Adds members chosen in a select-type question onto a new constructed list. More info.

 

AIE (QuestionName, Value)

Add If Equal: Adds members in a grid numeric, grid constant sum, grid ranking, grid with all radio buttons, constant sum, or ranking question that were given answers equal to a specific value.

More info. (Also see Loop functions).

AIG (QuestionName, Value)

Add If Greater: Adds members in a grid numeric, grid constant sum, grid ranking, grid with all radio buttons, constant sum, or ranking question that were given answers greater than a specific value.

More info. (Also see Loop functions).

AIL (QuestionName, Value)

Add If Less: Adds members in a grid numeric, grid constant sum, grid ranking, grid with all radio buttons, constant sum, or ranking question that were given answers less than a specific value.

More info.  (Also see Loop functions).

ANC (QuestionName)

ANC (QuestionName, Member#)

ANC (QuestionName, StartMember#, EndMember#)

Add if Not Chosen: Adds members not chosen in a select-type question onto a new constructed list.

More info.

ANE (QuestionName, Value)

Add if Not Equal: Adds members in a grid numeric, grid constant sum, grid ranking, grid with all radio buttons, constant sum, or ranking question that were given answers not equal to a specific value.

More info. (Also see Loop functions).

BanditMaxDiff(MaxDiffExerciseName, Items)
BanditMaxDiff(MaxDiffExerciseName, Items, NumThompsonItems)

Uses Thompson Sampling to select items from a parent list to add to the constructed list to be shown to a respondent within an adaptive bandit MaxDiff exercise. More info.

DisplayListLabels (ListName, "SeparatorText",

 "FinalSeparatorText")

Returns a string with every list item separated by "SeparatorText" with "FinalSeparatorText" prior to the last list item.  For example: DisplayListLabels (fruitlist, "," , "and") returns: grape, peach, and cherry.

FormatListLabels (ListName,

 "BeforeText", "AfterText")

Returns a string with all list items joined together with "BeforeText" before each item and "AfterText" after each item.  For example "<li>" and "</li>" as BeforeText and AfterText returns a bulleted list.

INSERT (TargetPosition#, ListName)

INSERT (TargetPosition#, ListName, Member#)

INSERT (TargetPosition#, ListName,

StartMember#, EndMember#)

Inserts members from a specified list to an exact position within a constructed list.

More info.

ListHasParentMember (ListName, ParentMember#)

 

Is true if the specified parent member exists in the specified list.

More info

ListLabel (ListName, Member#)

Returns the label of a specified member number in a list.

ListLabelsArray (ListName)

Returns a comma-separated list of member labels enclosed in quotes.

ListLength (ListName)

Returns the number of members in the list.

ListMax (Value)

Controls the maximum length of a list.

More info.

ListMin (Value)

Controls the minimum length of a list.

More info.

 

ListValue (ListName, Member#)

Returns the list member position from the original parent list for the specified member# on the specified constructed list.

ListValuesArray (ListName)

Returns an array of list positions from the original parent list for the specified constructed list (example: [1, 4, 6]).

Loop Functions for Lists

Click this link for available functions.

Mirror (ListName)

Mirror (ListName, Offset)

Adds list members from the parent list that correspond to the list values in ListName.

More info.

ParentListName()

Returns the parent list name of the current constructed list.  This is useful as input for "ListName" in other constructed list functions.  For example: ADD(ParentListName())

Randomize ()

Randomize (SeedValue)

Randomize (StartMember#, EndMember#)

Randomize (SeedValue, StartMember#, EndMember#)

Randomizes the members of a constructed list.

More info.

Remove (ListName)

Remove (ListName, Member#)

Remove (ListName, StartMember#, EndMember#)

 

Removes the members in the specified list from the constructed list.

More info.

Reverse ()

Reverses the members in a list.  For example, list members A, B, C, D when reversed become D, C, B, A.

RIC (QuestionName)

RIC (QuestionName, Member#)

RIC (QuestionName, StartMember#, EndMember#)

Remove If Chosen.  Removes items from the list that were chosen in QuestionName.

SetListLength (Value)

Controls the length of a list.

More info.

SortByLabel ()

Sorts a list based on list labels.  Numbers are sorted below letters.

SortByValue ()

Sorts the members in a constructed list with respect to their natural order (lowest to highest value) from their parent predefined list.  For example, list members with values 5, 3, 2, 7 would be sorted as 2, 3, 5, 7.

 

 

 

 

 

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