String Functions
Top  Previous  Next

SSI Web includes a number of string functions for operations involving text variables (such as openends, etc.).

The "SSI Script" column below gives the syntax for String Functions.

SSI Script:
Description:
IsNumber (QuestionName)
Is true if the entire string is all digits, false otherwise.
More info
Length (QuestionName)
Returns the number of characters contained in the response.
Mid (QuestionName, BeginPosition, Length)
Extracts a substring of a string given by QuestionName. The substring is extracted starting at the character number specified in BeginPosition (1-based counting) with length specified in Length.
QuestionName ()
Returns the name of the current question. May be used in Header 1, etc. sections, and also in skip patterns.
TextExists (QuestionName, 
  "TextToLookFor")
Searchers for "TextToLookFor" in the answer of QuestionName. If found, a 1 is returned; if not found, a 0 is returned.
ToLower (QuestionName)
Returns a lowercased version of the response.
ToUpper (QuestionName)
Returns an uppercased version of the response.


To concatenate strings, use the & operator. For example:

   [% "Hello " & Name %]

If Name is an open-end question and the respondent answered "Bob" for Name, then the SSI Script would return:

   Hello Bob