Popular Articles

  1. Piping From Two Questions Into One

    Sometimes it is appropriate to ask two separate questions on slightly different themes, but ask a follow-up question about what the respondents select as a combination.  In this case, we set up a script which filters the answer options displaye...
  2. Piping: Radio Button Grid to Radio Button Grid

    In this example, we are going to only show the rows in the target radio button grid questions for which any of a specified set of column answers were checked in the source Radio Button Grid. For this to work, the target Grid question must be se...
  3. sgapiHideQuestion(%%questionID,true/false)

    This function hides when set to true and shows a question when set to false. Example In the below script we hide question ID 3 by default. Then if question 1 is "yes" it is shown by setting sgapiHideQuestion to false. s...
  4. 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...
  5. Disqualify Based on Previously Collected Data

    Looking for a way to disqualify a respondent based on an email address or customer ID# that has already been entered in your survey? Not a problem! This script will check your survey's database for a particular question to see if the same data h...
  6. Piping From a Checkbox Into a Grid Question

    In this scenario, we are going to set up a custom script to filter the grid rows displayed in a target question based on any corresponding options selected in the source checkbox question. Normally, it would be fine to use standard piping, but here...
  7. Record Reason for Disqualification

    When using disqualification in a survey often there is more than one point at which a response can be disqualified. Unfortunately, there is not a way, within our core application, to easily evaluate how frequently each disqualification point is reac...
  8. sgapiIsAnswered(%%questionID)

    This function returns Boolean true if the given question has been answered. Examples In this example, we return whether question ID 2 is answered. %%output .= sgapiIsAnswered(2) Output would be 1 if answered and null if unanswere...
  9. Swap Columns And Rows Of A Grid Question (Vertical Single Choice)

    If you want to display single choice in a Radio Button Grid vertically this JavaScript will do just this but record the data in the same format by row. Check it out in an example survey ! OR Add this survey to your US account or your EU acc...
  10. Piping: Checkbox Grid to Radio Button Grid

    In this example we are going to only show the rows in the target radio button grid questions for which any of a specified set of column answers were checked in the source grid. For this to work, the target grid question must be setup with row t...