Filtering a Grid with a Menu Selection
This topic describes a technique available to Alpha Five Version 7 users.
When using a navigation system component for creating menus, a common task would be to display a page containing a grid. This topic describes how to add a filter to the URL that displays the target page.
Creating a Grid Component for the Alpha Five Customer Table
Create a grid component based on the AlphaSports Customer table.
Display the Grid > Query (DBF) page:
Click
next to the Order field to display the Order Builder.
Click
to select "Lastname" in the Sort by list.
Click
to select "Firstname" in the then, sort by list.
Click OK to continue.
Display the Grid > Fields menu.
Select several fields, including the Bill_state_region field.
Fix the Column Properties > Column headings to make them attractive.
Click File > Save as and name the grid component "Customers".
Close the Grid Component Builder.
Creating a Grid Component for the Customer Table
Create a grid component based on the AlphaSports Customer table.
Display the Grid > Query (AlphaDAO) page.
Enter "Lastname,Firstname" in the Order by field.
Display the Grid > Fields menu.
Select several fields, including the Bill_state_region field.
Fix the Column Properties > Column headings to make them attractive.
Click File > Save as and name the grid component "Customers".
Close the Grid Component Builder.
Creating a Grid Component for the Microsoft Access Customer Table
Create a grid component based on the AlphaSports.MDB database and the Customer table.
On the Grid > Query (ADO) menu:
Click
next to the Order field to display the Specify Order dialog.
Select "Lastname" and click
to add it to the Order expression.
Click Comma.
Select "Firstname" and click
to add it to the Order expression.
Click OK to continue.
Display the Grid > Fields menu.
Select several fields, including the Bill_state_region field.
Fix the Column Properties > Column headings to make them attractive.
Click File > Save as and name the grid component "Customers".
Close the Grid Component Builder.
Creating the Navigation System Component for Alpha Five
The next step is to create a navigation system component with several entries, each of which applies a different filter.
Create a navigation system component.
Display the Navigation System menu.
Select "Navigation System" in the central pane.
Change the Root Settings > Width to 1.75in.
Click Add Child.
Enter Bill_State_Region = "NY" into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field. Note that you have to replace the normal quotation marks with the URL safe equivalent, which is %22.
customers.a5w?customers_filter=bill_state_region=%22NY%22 |
Click Add Sibling.
Enter Lastname > "K" into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field. Note that you have to replace the normal quotation marks with the URL safe equivalent, which is %22.
customers.a5w?customers_filter=lastname>%22K%22 |
Click Add Sibling.
Enter Bill_Country <> "" into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field. Note that you have to replace the normal quotation marks with the URL safe equivalent, which is %22.
customers.a5w?customers_filter=bill_country<>%22%22 |
Click File > Save as and save the navigation system component as "Menu".
Click Add Sibling.
Enter Clear Filter into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field.
customers.a5w |
Creating the Navigation System Component for Microsoft Access
The next step is to create a navigation system component with several entries, each of which applies a different filter.
Create a navigation system component.
Display the Navigation System menu.
Select "Navigation System" in the central pane.
Change the Root Settings > Width to 1.75in.
Click Add Child.
Enter Bill_State_Region = 'NY' into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field.
customers.a5w?customers_filter=bill_state_region='NY' |
Click Add Sibling.
Enter Lastname > 'K' into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field.
customers.a5w?customers_filter=lastname>'K' |
Click Add Sibling.
Enter Bill_Country <> '' into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field.
customers.a5w?customers_filter=bill_country<>'' |
Click File > Save as and save the navigation system component as "Menu".
Click Add Sibling.
Enter Clear Filter into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field.
customers.a5w |
Creating the Navigation System Component (SQL)
The next step is to create a navigation system component with several entries, each of which applies a different filter.
Create a navigation system component.
Display the Navigation System menu.
Select "Navigation System" in the central pane.
Change the Root Settings > Width to 1.75in.
Click Add Child.
Enter Bill_State_Region = 'NY' into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field. Note that you have to replace the normal quotation marks with the URL safe equivalent, which is %22.
customers.a5w?customers_filter=bill_state_region='NY' |
Click Add Sibling.
Enter Lastname > 'K' into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field. Note that you have to replace the normal quotation marks with the URL safe equivalent, which is %22.
customers.a5w?customers_filter=lastname>'K' |
Click Add Sibling.
Enter Bill_Country <> '' into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field. Note that you have to replace the normal quotation marks with the URL safe equivalent, which is %22.
customers.a5w?customers_filter=bill_country<>'' |
Click File > Save as and save the navigation system component as "Menu".
Click Add Sibling.
Enter Clear Filter into the Node Settings > Text field.
Enter the following expression into the Node Settings > URL field.
customers.a5w |
Placing the Components on a Page
Create a new A5W page.
Click File > Save as and save the page as "Customers".
Click Insert Component to display the Insert Component dialog.
Click Select, pick the "Menu" component, and click OK.
Select the text that appears in the navigation system component: "Place all page content here." and delete it.
Leave the cursor in this table cell and click Insert Component to display the Insert Component dialog.
Click Select, pick the "Customers" component, and click OK.
Save the new page and exit from the HTML Editor.
The result should look something like one of the following. as you click the different menu entries, you will see that you load just the customers.a5w page, but with different filter.

Filter Expression for Alpha Five Grid Component [Picture]

Filter Expression for ADO/ODBC Grid Component [Picture]
See Also
Supported By
Alpha Five Version 6 and Above