If you are utilizing Custom Scripts in your surveys, you will likely have a need for referencing answer options, questions, or survey pages. Each of these items have their own unique identifiers that can be referenced in your scripts. Read on to learn how to access these IDs.
Your Survey ID
To get the Survey ID take a look at the URL bar while you're in the survey Build tab. The number that follows /id/ is your survey ID.
Customizing Your Build Tab to Display IDs
Question and Page IDs are available on the Build tab. Click the link to View Settings link found above Page One of your survey. Select Page IDs and Question IDs, then click Apply.
Throughout the survey, you will have your Question IDs and Page IDs available to you. Page IDs will be visible directly to the right of your page title. Question IDs will be visible under every survey question.
Using the Survey Legend to Obtain IDs
If you are looking to access all IDs at once, you might try the Survey Legend available under the Tools Menu. This will display Question IDs and Option IDs (sometimes referred to as SKUs) as well as other metadata about your survey elements. You can download the Survey Legend to Word in the top right-hand corner of the page if you wish!
Using the ID Lookup Tool to get IDs within Your Custom Scripting Action.
While there is an option to eliminate the use of IDs that change across surveys (see our tutorial on Custom Scripting with Question Aliases), you'll likely still need to access page, question and option IDs when writing scripts.
Within your custom script action, you can use the Question & Page ID Lookup tool to get all of the IDs for your scripts.
Simply click the dropdown and scroll to the question, page, or option you wish to use in your script.
When you select it, that page, question or option ID will display just above your script, for reference.
Alright, so how do I use this in a script?
If you're familiar with our merge code helper that is available throughout elsewhere throughout the Build tab for dynamically merging in the proper merge code with the appropriate ID based on the question, you select you might be expect this dropdown to work similarly. Unfortunately this will not insert the ID at your cursor (though it would be great if it did!) This is basically just a display tool to give you quick access to the IDs you need in your scripts. You'll still need to key the ID value within your scripting function as necessary.
Our scripting documentation covers all the functions available in Custom Script including those that require IDs.
Admin
— Dave Domagalski on 04/18/2018
@Lbeller: Thank you for your note.
I'm afraid that Question IDs cannot be changed.
I should also note that SurveyGizmo does not have plans to change this functionality with regard to IDs as they play a fundamental role as a unique identifier in our backend infrastructure.
I'm sorry if any previous posts were misleading about that aspect.
Going forward, you might consider utilizing Question Aliases for scripting purposes, as they offer a bit more flexibility:
https://script.surveygizmo.com/help/scripting-variable-names
I'm sorry for the trouble!
David
Documentation Specialist
SurveyGizmo Customer Experience
— YFN_Administrator-Paige on 04/18/2018
In the year since the last posting, is there now a way to change Question IDs? We built a comprehensive data reporting platform and redesigned a survey so now the question IDs don't match up. Will cost me $1000's in consulting fees to have it all re-programmed.
Admin
— Bri Hillmer on 09/26/2016
@Xydtipaht: If I need to easily find a question by ID I use the customize builder option to display the question on the page then do a control/command F to find the question.
I hope this helps!
Bri
Documentation Coordinator/Survey Sorceress
SurveyGizmo Customer Experience Team
— Xydtipaht on 09/26/2016
Anyway to do a search for questions via question ID? I have to make changes to questions and it is quite tedious to go through each question as the QIDs are not in order.
Admin
— Bri Hillmer on 08/22/2016
@Ying: There is not a way to change the IDs in your survey I'm sorry to say. A copy of your original survey will have the same IDs however.
I hope this helps!
Bri Hillmer
Documentation Coordinator
SurveyGizmo Support
— Ying on 08/22/2016
Is it possible that we change the existed question ID manually so that we can have the same ID with preious survey and compare the data?
Admin
— Dave Domagalski on 05/26/2016
@Strasser: Thank you for exploring SurveyGizmo documentation!
It is a bit difficult to say what might be causing the issue that you have described. I will reach out via email and we can take a closer look!
David Domagalski
Survey Explorer
SurveyGizmo Customer Support
— Jan on 05/26/2016
Question ID's are not displayed, even if I tick the box. What's wrong?