Link Address Builder

A common requirement is to open a page that contains a grid component, showing just records that match certain values.

For example, assume that when you click the hyperlink, you want to open a page named CustomerInfo.A5w. We will make the following assumptions about this page:

Alpha Five .DBF Syntax

If the data is coming from an Alpha Five table, the filter expression that we want to apply to the customers grid on the CustomerInfo.A5w page is therefore:

customer_id="{customerID}"

where {customerID} is the value in field for which we are defining the Link control.

Grid components understand two special parameters: <componentName>_Filter and <componentName>_Order. So, to open the CustomerInfo.A5w page showing just the records that we want, the computed link address is:

CustomerInfo.A5w?customers_filter=customer_id="{customerID}"

Other example computed link address are:

CustomerInfo.A5w?customers_filter=firstname="{firstname}".and.lastname="{lastname}"?customers_order="{lastname}"

OrderInfo.A5w?orders_filter=orderid="{orderid}"

SQL Syntax

The syntax for the "Filter" and "Order" parameters must be appropriate for the database on which the Grid component is based. SQL syntax typically uses single quotes for character values and "AND" and "OR" to join conditions (as opposed to .AND. and .OR. which Alpha Five uses for querying local tables). So the above examples would become:

CustomerInfo.A5w?customers_filter=customer_id='{customerID}'

CustomerInfo.A5w?customers_filter=firstname='{firstname}' AND lastname='{lastname}'?customers_order={lastname}

OrderInfo.A5w?orders_filter=orderid='{orderid}'

Composing a Link Address

If you have a field in your grid where the Display Settings > Control Type is "Link":

  1. Click or in the Link Properties > Link Address field to display the Link Address Builder.

  2. Select a page from the Pages in Project list and click Insert Page.

  3. Position the cursor in the Link Address text box, select a field placeholder from the Grid Fields list, and click Insert Field. Repeat as Necessary.

  4. Add additional syntax elements as Necessary to the Link Address text box.

  5. Click OK to save your inputs or Cancel to discard them.

See Also

Setting Grid Control Properties, Creating Grid Components, Automatically Populating Linking Field Values

Supported By

Alpha Five Version 6 and Above

Limitations

Web publishing applications only.