Popular Articles

  1. sgapiASort(%%array, %%flag)

    This is equivalent to the asort function in PHP. This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual...
  2. sgapiGetSurveyProgress()

    This function returns the percentage progress based on survey pages. Example If the above script is placed at the top of each survey page of a 6 page survey (including the Thank You page) the below percentages would be returned: ...
  3. sgapiShuffle(%%array)

    This is equivalent to the shuffle function in PHP. Given an array this function will randomly reorder the array. It will evaluate as true on success and false on failure. To see an example or learn more other PHP functions and PHP program...
  4. sgapiStrPos(%%haystack,%%needle,%%offset)

    This is equivalent to the strpos function in PHP. This function returns the numeric position of the first occurrence of %%needle string in the %%haystack string. If the optional %%offset parameter is specified, the search will start this number of...
  5. 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...
  6. 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...
  7. 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...
  8. sgapiMin (%%array)

    This is equivalent to the min function in PHP. It is used to find the lowest value. Example %%minvalue = array(85,66,22,99); %%output .= sgapiPrint_R(sgapiMin(%%minvalue)); // will output 22 To see an example or learn more...
  9. sgapiIConv(%%in_charset, %%out_carset, %%string)

    This is equivalent to the iconv function in PHP. Performs a character set conversion on %%string from %%in_charset to %%out_charset. To see an example or learn more other PHP functions and PHP programming, visit PHP Documentation . ...
  10. sgapiIn_Array(%%needle,%%haystack,%%strict)

    This is equivalent to the in_array function in PHP. It searches the array %%haystack for %%needle. Setting %%strict to TRUE will also check the type of the needle in the haystack. To see an example or learn more other PHP functions and PH...