Airlines Demo Survey
Airlines Demo Survey
The Airline demo survey contains a demonstration of using the “Additional Data lists” feature of SurveyToGo along with the “List sources” feature to easily use external excel files in surveys and be able to filter the data based on answers of questions.
The survey contains 3 questions:
- Where did you arrive? (list of countries)
- Which airport did you arrive from? (list of airports of the country in Q1)
- Which airline did you fly? (list of airlines based on the Airport of Q2)
For this survey we are using:
- 3 Excel files with the data which were uploaded to the server.
- 3 “Additional Data Lists” – which are the tables generated from the uploaded excel data.
- 3 “List sources” – which are the same tables of #2 but filtered based on question answers.
Step 1: Uploading the Excel data as “Additional Data Lists”:
I’ve uploaded the Excel files into 3 separate data lists:
- Airline – Countries: Represents the countries available.
- Airline – Airports: The airports available.
- Airline – Test: The excel “(airline-airport-country)quota.xls” which contains the link of airline and airport.
You can double click on a data list to see the data. For more information on how to upload an excel and make it a data list, contact me.
Step 2: Configuring the List sources of the questions
A list source in SurveyToGo sits on top of a data list and allows you to either retrieve ALL the data or only a part of a data list. In this case we have 3 list sources. You can see them by clicking on the “Advanced > Edit list sources”:
The list sources are:
- Countries: is a simple FULL list of all the countries from the “Airline – Countries” additional data list.
- Airports: is a filtered list of the “Airline – Airports” data list. It is filtered by the answer to Q1.
- Airports-Airlines: is a filtered list of airlines based on the answers of Q2.
You can see the code that generates the list source by clicking on the list source. For example, this code:
Is the code that generates the list source of the countries. It uses the “Airline-Countries” data list and uses the “COUNTRY_NAME” column as the answer text and the COUNTRY_IATA column as the value field. Lastly it will order the list based on the COUNTRY_NAME list.
If we take a look at the “Airports” list source, you will see that it has an additional filtering, based on the answer of Q1:
The highlighted “where” clause filters the “Airline-Airports” data list for entries which contains the “COUNTRY_IATA” that was selected in Q1. This is how the smart filtering works.
Step 3: Configuring the questions to use the list sources
After we have the list sources configured, we can use them by using a “Freetext” question and configuring it to show its data from a list source:
In this example, the question is configured as a free text question and the answer list will be taken from the “Countries” list source thus showing the list of countries: