New Articles

  1. sgapiCurrentPageSKU()

    This function will return the sku of the current page. Example The below example outputs the current page sku to the page. %%output .= sgapiCurrentPageSKU();
  2. sgapiCSVSplit(%%string)

    Splits the given comma-separated string into an array. Example In the below example we create an array from a comma-separated list. %%string = apples, oranges, bananas, pears, grapes, papaya, kiwi; %%output = sgapiCSVSplit(%%string); The outpu...
  3. sgapiDisqualify(%%message)

    This function disqualifies the user and ends the survey. %%message will display your customized message to the respondent. Example In this example, if the answer to question ID 2 is "no" and there are fewer than 3 answered questions on page ID 1,...
  4. sgapiHidePage(%%pageID,true/false)

    This function hides or shows a page. Example In this example script we hide pages 3 and 4 by default by setting sgapiHidePage for these page IDs to true. Then, based on the answer to the jedi or sith question on page one we set the sgap...
  5. sgapiSetTitle(%%questionID,%%value,%%language)

    This function sets the title of a question. HTML is allowed. The %%language parameter is a required parameter. The values are the languages available in the translation menu. Languages must be title case, for example, %%language = "Spanish". ...
  6. sgapiGetPipeSkus(%%questionID)

    This function returns an array of skus=>values for the given question-piped question. Example Check it out in an Example Survey For example if we question pipe from the below question... Into this question and output ...
  7. sgapiGetQuestionIDByAlias(%%alias)

    This function returns the Question ID by the "alias" assigned via the Build Tab. Learn more here . Examples The following example will output the Question ID for a question with an alias of "gender question". %%alias = "gender q...
  8. sgapiGetValue(%%questionID)

    This function returns the value (reporting value) of an answered question (or null, if not answered). For single answer questions, a single value is returned. Multi-answer questions return an array. Grid and custom group questions return a multidime...
  9. sgapiHideOption(%%questionID,%%reportingvalue, true/false)

    This function hides an answer option by reporting value. The true/false parameter can be used to support changes in answer options when respondents use the back button. For grid questions the answer fields in column associated with that repo...
  10. sgapiGetQuestionOptions(%%questionID, %%type)

    This function returns an array of options for the given question. %%type can be "Reporting" or "Title" (default for type is "Title"). Example The below script outputs both the answer option titles and reporting values to the page. ...