New Articles

  1. sgapiRandomizeTable(%%questionID)

    This function shuffles the rows of the given table. Example In the below example we randomize the rows of table question ID 2. sgapiRandomizeTable(2);
  2. sgapiGetTableQuestionSkus(%%questionID)

    This function returns an array of skus for the given table. This can also be used to get the skus for the subquestions in Custom Groups. Example In this example we output the array of table question skus to the page. Check it out ...
  3. sgapiReferrer()

    This function returns the URL of the webpage that linked to the survey for the given respondent. Example In the below example survey we output the Referrer to the page which is this tutorial! Check it out in an Example Survey %%output .= sgap...
  4. sgapiSetRequired(%%questionID, true/false)

    This function toggles the required status of a question. Example In this example, if no questions were answered on page ID 1, then question ID 4 is required. In case the respondent goes back and answers a question on page ID 1, the scri...
  5. sgapiArrayGet(%%array,%%index)

    Returns the value of the given index in an array. Example In this example we pull the value for a particular row (10010) from a list of textboxes where we are collecting favorite movie by genre. %%movies = sgapiGetValue(20); %%f...
  6. sgapiJumpToPage(%%pageID)

    This function jumps the respondent to the specified page ID. Example In this example, respondents who answer question ID 2 "No" are jumped to page ID 4. Check it out in an Example Survey %%children = sgapiGetValue(2); i...
  7. sgapiCheckboxTotalChecked(%%questionID)

    This function returns the number of checkboxes selected for the given question. Example In the below example we get the total checked checkboxes and output it to the page. Check it out in an Example Survey %%output .= sgap...
  8. sgapiRemoveOption(%%questionID,%%reportingvalue)

    This function removes an multiple choice option (by reporting value as %%reportingvalue). For table questions it hides the column associated with that reporting value for all rows. This will not reset if back button is used. If you'd like to have th...
  9. sgapiRunAction(%%questionID)

    This function causes the given action to run and returns true if it is successful (returns false if given questionID is not an action). Example sgapiRunAction(27);
  10. sgapiQuestionsAnsweredOnPage(%%pageID,%%options)

    This function returns a count of answered questions on a given page. Use %%options to specify question type. %%page should be the page sku/ID (not the page number). Possible Values for %%options* RANK (Evaluates Drag & Drop and Table Rank q...