Popular Articles

  1. sgapiGetQuestionResponseCount

    This is a realtime reporting function. You can query the total response count for a question using the %%questionID parameter. Or, by passing an option sku in %%osku, you can return the response count for a particular answer option. You can also fil...
  2. 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...
  3. Attaching Custom Content Files to an Email

    Building and sending attachments with custom content is a very common customization achieved via custom scripting. To learn how to build a PDF file with custom content see our PDF Functions . Once you've built your custom content the are two o...
  4. sgapiEvaluateMergeCodes(%%code)

    This function returns the value for the given merge code. Merge codes need to be wrapped in single quotes ' ' so that they are represented as strings. Example In this function we are evaluating and returning the value from the fir...
  5. Filtering Textbox List by Checkbox Question

    As piping into answer options is not available for Textbox List questions, this script will query the answers from a source Checkbox question and filter the option list in a target Textbox List question accordingly. For this to work, the option titl...
  6. sgapiGetPipeValues(%%questionID)

    This function returns an array the piped values for the given question-piped question. Example In the below example we output the values of question ID 6 which is negative question piped from a question on a previous page. Check i...
  7. Show a Number of Randomly Selected Pages from a Survey

    As part of our core randomization options you have the ability to display X number of random questions on the page. Unfortunately, there is not a built-in way to do the same with pages in a survey. Never fear! We'll cover the steps to use a pretty s...
  8. sgapiGetTableQuestionTitles(%%questionID)

    This function accepts the Question ID of a table and returns an array in the following format: [questionID] => "title"  Example In this example we output the array of table question titles to the page. Check it out in an Example S...
  9. 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 ...
  10. Update Hidden Value If Question Answers Do Not Match

    We have a feature that will verify two textbox questions on the same page match (Example: Verify that the respondent enters the same email address twice).  This code snippet is used to check to see if the answers to any two questions in the surve...