Developer Documentation Library > Interview templates > UXUI custom properties > uxui_list_data_source, uxui_list_data_id, and uxui_list_data_filter
 
uxui_list_data_source, uxui_list_data_id, and uxui_list_data_filter
Use the uxui_list_data_source, uxui_list_data_id, uxui_list_data_filter properties with database questions to filter the database input by column in a table or by using a filtering function.
Possible values
uxui_list_data_source
Specifies a public function that provides data source for the list.
uxui_list_data_id
An ID that is unique within the interview script.
uxui_list_data_filter
(Optional.) One or more identifiers that must be the IDs of another list. These values are also passed into the public function that is specified by the uxui_list_data_source property.
Applies to
Text questions and text database questions
Example
The following example uses a database question based on a DDF. The database properties have been omitted from some definitions to reduce the size of the example.
Make "Make"
[
uxui_list_data_source = "VehiclesMake",
uxui_list_data_id = "Make"
]
text
db(
ConnectionString = "Provider=mrOleDB.Provider.2;Data Source=mrDataFileDsc;Location=%PROJECT_DIRECTORY%\Vehicles.ddf",
Table = "HDATA",
MinAnswers = 1,
MaxAnswers = 1,
CacheTimeout = 600,
Columns(
ID = "Make",
Label = "Make"
),
CacheConnection = true
) initialanswer("_" );

Model "Model"
[
uxui_list_data_source = "VehiclesModel",
uxui_list_data_id = "Model",
uxui_list_data_filter = "Make
]
text
db(
<See the Make "Make" section>
Columns(
ID = "Model",
Label = "Model"
),
) initialanswer("_" );

FuelType "Type"

uxui_list_data_source = "VehiclesFuelType",
uxui_list_data_id = "Type",
uxui_list_data_filter = "Make,Model"
]
text
db(
<See the Make "Make" section>
Columns(
ID = "Type",
Label = "Type"
),
) initialanswer("_" );
Routing
Function VehiclesMake (IOM)
Dim Vehicles
Set Vehicles = IOM.Questions["Vehicles"]
With Vehicles[0]
Set VehiclesMake = .Make.Categories
End With
End Function

Function VehiclesModel(IOM, Make)
Dim Vehicles
Set Vehicles = IOM.Questions["Vehicles"]
With Vehicles[0]
.Model.DBFilter = "Make = '" + Make + "' OR Make = '_'"
Set VehiclesModel = .Model.Categories
End With
End Function

Function VehiclesFuelType(IOM, Make, Model)
Dim Vehicles
Set Vehicles = IOM.Questions["Vehicles"]
With Vehicles[0]
.FuelType.DBFilter = "(Make = '_' AND Model = '_')"
If Model <> "_" And Model.Len() > 0 Then
.FuelType.DBFilter = .FuelType.DBFilter + " OR (Make = '" + Make + "' AND Model = '" + Model + "')"
End If
Set VehiclesFuelType = .FuelType.Categories
End With
End Function
See
UXUI custom properties