Filtering a Grid with a Menu Selection

Description

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 Anywhere Customer Table

  1. Create a grid component based on the AlphaSports Customer table.

  2. Display the Grid > Query (DBF) page:

    • Click the 'up down arrows' icon next to the Order field to display the Order Builder.

      images/Order_button.gif
    • Click the 'down' icon to select "Lastname" in the Sort by list.

      images/List_Button_Blue_Down.gif
    • Click the 'down' icon to select "Firstname" in the then, sort by list.

      images/List_Button_Blue_Down.gif
    • Click OK to continue.

  3. Display the Grid > Fields menu.

    • Select several fields, including the Bill_state_region field.

    • Fix the Column Properties > Column headings to make them attractive.

  4. Click File > Save as and name the grid component "Customers".

  5. Close the Grid Component Builder.

Creating a Grid Component for the Customer Table

  1. Create a grid component based on the AlphaSports Customer table.

  2. Display the Grid > Query (AlphaDAO) page.

  3. Enter "Lastname,Firstname" in the Order by field.

  4. Display the Grid > Fields menu.

    • Select several fields, including the Bill_state_region field.

    • Fix the Column Properties > Column headings to make them attractive.

  5. Click File > Save as and name the grid component "Customers".

  6. Close the Grid Component Builder.

Creating a Grid Component for the Microsoft Access Customer Table

  1. Create a grid component based on the AlphaSports.MDB database and the Customer table.

  2. On the Grid > Query (ADO) menu:

    • 1. Click the '...' icon next to the Order field to display the Specify Order dialog.

    • 2. Select "Lastname" and click the '>' button to add it to the Order expression.

    • 3. Click Comma.

    • 4. Select "Firstname" and click the '>' button to add it to the Order expression.

    • 5. Click OK to continue.

  3. Display the Grid > Fields menu.

    • Select several fields, including the Bill_state_region field.

    • Fix the Column Properties > Column headings to make them attractive.

  4. Click File > Save as and name the grid component "Customers".

  5. Close the Grid Component Builder.

Creating the Navigation System Component for Alpha Anywhere

The next step is to create a navigation system component with several entries, each of which applies a different filter.

  1. Create a navigation system component.

  2. Display the Navigation System menu.

  3. Select "Navigation System" in the central pane.

  4. Change the Root Settings > Width to 1.75in.

  5. Click Add Child.

  6. Enter Bill_State_Region = "NY" into the Node Settings > Text field.

  7. 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
  8. Click Add Sibling.

  9. Enter Lastname > "K" into the Node Settings > Text field.

  10. 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
  11. Click Add Sibling.

  12. Enter Bill_Country <> "" into the Node Settings > Text field.

  13. 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
  14. Click File > Save as and save the navigation system component as "Menu".

  15. Click Add Sibling.

  16. Enter Clear Filter into the Node Settings > Text field.

  17. 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.

  1. Create a navigation system component.

  2. Display the Navigation System menu.

  3. Select "Navigation System" in the central pane.

  4. Change the Root Settings > Width to 1.75in.

  5. Click Add Child.

  6. Enter Bill_State_Region = 'NY' into the Node Settings > Text field.

  7. Enter the following expression into the Node Settings > url field.

    customers.a5w?customers_filter=bill_state_region='NY'
  8. Click Add Sibling.

  9. Enter Lastname > 'K' into the Node Settings > Text field.

  10. Enter the following expression into the Node Settings > url field.

    customers.a5w?customers_filter=lastname>'K'
  11. Click Add Sibling.

  12. Enter Bill_Country <> '' into the Node Settings > Text field.

  13. Enter the following expression into the Node Settings > url field.

    customers.a5w?customers_filter=bill_country<>''
  14. Click File > Save as and save the navigation system component as "Menu".

  15. Click Add Sibling.

  16. Enter Clear Filter into the Node Settings > Text field.

  17. 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.

  1. Create a navigation system component.

  2. Display the Navigation System menu.

  3. Select "Navigation System" in the central pane.

  4. Change the Root Settings > Width to 1.75in.

  5. Click Add Child.

  6. Enter Bill_State_Region = 'NY' into the Node Settings > Text field.

  7. 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'
  8. Click Add Sibling.

  9. Enter Lastname > 'K' into the Node Settings > Text field.

  10. 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'
  11. Click Add Sibling.

  12. Enter Bill_Country <> '' into the Node Settings > Text field.

  13. 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<>''
  14. Click File > Save as and save the navigation system component as "Menu".

  15. Click Add Sibling.

  16. Enter Clear Filter into the Node Settings > Text field.

  17. Enter the following expression into the Node Settings > url field.

    customers.a5w

Placing the Components on a Page

  1. Create a new A5W page.

  2. Click File > Save as and save the page as "Customers".

  3. Click Insert Component to display the Insert Component dialog.

  4. Click Select, pick the "Menu" component, and click OK.

  5. Select the text that appears in the navigation system component: "Place all page content here." and delete it.

  6. Leave the cursor in this table cell and click Insert Component to display the Insert Component dialog.

  7. Click Select, pick the "Customers" component, and click OK.

  8. Save the new page and exit from the HTML Editor.

  9. 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.