Set a Dynamic List Box
Dynamic List Box is a feature that uses a Where Clause to control the values displayed in one list box based on the value selected from another list box. Dynamic List Boxes can be used for list boxes on the same page view.
For example, a user could add a list box and create a Where Clause on the State field on the Customers page so the country selected determines the values displayed in the States/Regions list box.
Refer to Add List Boxes and Combo Boxes for general information.
To filter the options in one list box based on the value selected from another on the same view:
-
Access the Page Columns page.
-
Click Add.
-
Enter the name of the list box or combo box in the COLUMN field.
-
Select List Box or Combo Box in the CONTROL list box.
-
Select the List Box or Combo Box view from the LIST SOURCE list box.
-
Click Save.
-
Click Vertical View.
-
Select the view from the database that provides the values to the list box from the List Source list box.
-
Select the name of the column that will be stored from the List Value Field list box.
-
Select the name of the column that displays a description of the item from the List Display Field list box.
-
Click Save.
To create a WHERE clause that controls the options in a list box based on a value selected from another list box for the same page view:
-
Click the Advanced Properties tab on the Page Columns page’s Vertical View.
-
Enter the WHERE clause in the List Where Clause field.
NOTE: For example, a user can filter the Region List Box by Country by entering CountryID = N’#Country’. If the Country field contains text, single quotes are required to indicate the field contains text and N is required to indicate the text field contains Unicode characters. If the N is excluded, Unicode characters will be lost. The field name to the left of the operator is the field name in the list view. The field name to the right of the operator is being passed in from the page. Surrounding the column name with pound signs (#) indicates it is a dynamic field and the value is coming from the page view. If the field is numeric, the N and the single quotes must be excluded. For example, if the CountryID field is an integer data type in SQL, the Where Clause would be Country = #CountryID#.
-
Click Save.
Was this article helpful?
Sorry about that.
Why wasn't this helpful? (check all that apply)
Thanks for your feedback.
Want to tell us more?
Send an email to our authors to leave your feedback.
Great!
Thanks for your feedback.