Many survey questions require the survey taker to respond by selecting an option from a radiobutton list, dropdown list, or checkbox list. Although E-Data Collection allows you to define the options via the administrative tool, some answer groups may be so large you might want to pull it from an existing table or view in a separate database. For instance, if the question is "What is your instructor's name?" the options may be pulled from a table named "Instructors" in the University database. This will then populate a dropdownlist. The Manage Sources screen is where you can specify such external sources. Access this screen by clicking on the Source Manager link on the Build tab's panel. Alternatively, once logged in, the URL is: http://mavalon.webhost4lifemysql.com/EDCv4/admin/Sources.aspx.
There are three requirements, however, which determine whether a source may be added:
- The database must exist on the same SQL server as the Survey database,
- You must be able to connect to this database using the same username and password used to connect to the Survey database.
- The table must have an identity column set as a unique, numeric key.
If a database table satisfies these conditions, it may be used as an "external source" for answer options.
To add a source, enter a short description to identify it, and select a database from the dropdown list.
Once you select the appropriate database, the form will refresh with an additional field: Table/View. Select a table or view from the list and allow the page to refresh again, this time with an additional two fields: Text Field and Key Field dropdown lists.
The text field is the text that will populate the answer dropdown list for questions using this source. The key field ensures that each option has a unique identifier.
When you click Add Source, you will notice that the new source's description appears selected in the Sources dropdown list, and the button changes to Update Source.
In edit mode, you have an additional checkbox option to deactivate or activate the source.
Deactivating the source does two things:
- Removes it from the available sources dropdown list in the Option Manager screen.
- Removes the options from any questions where its assigned answer option group used it as a source to populate dropdown lists or radiobutton lists.
Once added, the source is available to the Option Manager screen (see the next section). Once you define an option group in the Option Manager as pulling from the added source, it becomes available to surveys.
It is important to note that you should never deactivate the source unless it is absolutely necessary. This action may produce undesirable results in the surveys that are associated with it, or lead to reporting errors or inaccuracies. Once created the source should be left alone. It should also be noted that sources added to E-Data Collection should be tables and views that will not be altered to any great extent. Adding data to these tables or views is acceptable, but deletions should not be performed as long as the survey system is utilizing the table or view.