New Articles

  1. sgapiSetQuestionProperty(%%questionID, %%property, %%value)

    This function sets the given property to the given value for the given question. Possible Properties Values exclude_number boolean labels_right boolean orientation...
  2. sgapiArraySet(%%array,%%index,%%string)

    This function sets the value of an item within an array. Example In the below example we change the value of textbox 10003 from a list of textboxes to 'Amelie'. %%movies = sgapiGetValue(5); %%foreign = 10003; %%value = 'Amelie'; sgapiArrayS...
  3. sgapiResultsQuestionAverage(%%questionID,%%query = "")

    This function returns the average answer of the answers given question ID across all completed surveys in real time. %%query allows you to optionally specify a query string variable to filter by. Like this: "urlvar_department=support" will retu...
  4. sgapiPipeMatrixRows(%%questionID, %%rows)

    This function pipes the given rows into the given Custom Table question. You can specify a static value or pull selected values from a previous question. Example The below example pipes the given rows in the array into the given Custom ...
  5. sgapiSetQuestionRuntimeProperty(%%qID,%%property,%%value)

    This function sets the specified runtime property for the given question. Possible Properties Values Required true/false Soft-Required true/false Disabled tr...
  6. sgapiPageMap()

    This function returns an array of page skus keyed to an array of id => type, as in element type, for all elements in the entire survey, regardless of where in the survey it is used. Return Type Survey Element Type TEXTBOX Text fields incl...
  7. sgapiGetPagePipedAnswers

    This function returns an array of the piped values for the given page-piped question. Example In the below example, we output the values of question ID 8 which is page-piped from a question on a previous page. Check it out in an E...
  8. sgapiSetPageStartingNumber(%%question_num)

    This function sets the number of the first question of the page (default is 1). You can use this script on each page to restart the question numbering on each page. Example The below example script can be placed on the beginning of each...
  9. sgapiCurrentPageTitle()

    This function will return the title of the current page. Example The below example outputs the current page title to the page. Check it out in an Example Survey %%output .= sgapiCurrentPageTitle(); The output would ...
  10. sgapiSetTableOrderByTable(%%tableID,%%refID,%%language)

    This function accepts two table Question IDs and orders the rows of the table in %%tableID by the table in %%refID. This allows you to maintain randomization order across tables in your survey. The row headers for both tables must be identical. ...