Home > Uncategorized > Airlines Demo Survey

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:

  1. Where did you arrive? (list of countries)
  2. Which airport did you arrive from? (list of airports of the country in Q1)
  3. Which airline did you fly? (list of airlines based on the Airport of Q2)


For this survey we are using:

  1. 3 Excel files with the data which were uploaded to the server.
  2. 3 “Additional Data Lists” – which are the tables generated from the uploaded excel data.
  3. 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:




Categories: Uncategorized
  1. rockerox
    June 26, 2012 at 4:47 pm

    how i can add more filters in “where” clause?

    • June 27, 2012 at 9:06 am

      You can use the following syntax in the string of the where-clause (notice the @@ at the start of the string):
      “@@ xx=yy AND zz=tt”
      the @@ at the start will allow you to add one or more AND and OR to the where clause part.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: