Link Properties


An essential decision about a link control is what it will display. The options are: Value in field, Value from other field(s), Static text, Static image, Image in another control


Link controls have choices for the Link address type. The link could be: a URL (presumably also a field value), an email address (presumably also a field value), a link to the detail view form, a value that is computed (see Link Address Builder ), a value that specifies filter, order, and/or linking information for the records in a second grid

In-line style 

Specifies style attributes that override the settings inherited from the style sheet. Click to define the In-line style. Refer to the Style Editor for details.

Display what in link? 

Specifies style attributes that override the settings inherited from the style sheet. Click to define the In-line style. Refer to the Style Editor for details. Specifies what is displayed in the link. The options are:"Value in field", "Value from other field(s)", "Static text", "Static image", "Image in another control"

Field(s) to display 

Specify the HTML to display in the link. Use field placeholders to include values from other fields in the Grid. Typically, the fields that you reference will have their 'Hide row' or 'Hide column' property checked.

Static text 

Specify the text to display in the link.

You can include HTML markup in the text.

Static image 

Specify the name of the image to display.

Static image inline style 

Specify style attributes for the image.

Static image text 

Specify the text description for the image. Tip: To display the contents of a text field, enclose the field in curly braces. e.g. {description}

Dynamic image control 

Specify the image control on the Grid that contains the image to display in the link. Typically, the 'Hide row' or 'Hide column' property for this control will be checked.

Using Images in Link Fields 

  1. Open the Grid Builder . On the Design tab click on the Component Type page and select Tabular in the Grid Layout menu.

  2. Open the Data Source page and select either .dbf or SQL .

  3. On the Query(DBF) or Query(AlphaDAO) page select the table you will work from.

  4. Open the Fields page. Select several fields and move them from the Available Fields: list into the Selected: fields list; using the arrows between the two list.

  5. Select the field that you want to contain the linking data.

  6. Go to the selected field's Field Properties list. Under the Display Settings section find the Control type property. Set the control type to 'link '.

  7. Now go to the Link Properties section of the Field Properties. Find the Display what in link? property and select "Image in another control ".

  8. While in Link Properties set the Dynamic image control property to the name of the image field you wish to display. For the Link address type property select "DetailView link ".

    Preview of the grid showing both ID and Thumbnail fields before modification.
    Images may be used in hyperlinks and in link fields to detail view forms.

Adding an Image in Hyperlink and Link Fields to a Detail Form 

For the field that contains the linking data:

  1. In Display Settings > Control typeset the control type of the field to "link".

  2. In Link Properties > Display what in link?select "Image in another control".

  3. In Link Properties > Dynamic image control select the name of the image field that you wish to display.

  4. In Link Properties > Link address type select "DetailView link".

For the field that contains the image you wish to display:

  1. In Column Properties > Hide column check the check box.

    Preview of the grid after modification showing the Thumbnail image in the ID field.

Static Text 

You use the Link Display Value dialog box to compose the HTML code that will be displayed in a link. The link may contain references to any of the fields on the grid.

  1. Select the field placeholders in the Available Fields list that you want to use in the link expression.

  2. Arrange the field placeholders in the order that you want to see them in the expression.

  3. Optionally, add any text that you want around the fields.

  4. Optionally, click HTML Editor to use it to format the expression.

  5. Click OK to save your work or Cancel to discard it.

Link address type 

You can specify that the link address type is 'Javascript'. Any Javascript function call or command can be added to the 'onClick' event. The Javascript will be executed when the link is clicked. "Field Value is a Link address" , "Field Value is an email address" , "DetailView link" , "Computed from fields in the grid" , "Javascript"

Javascript link with an onClick event opening an alert box.

Link Address 

When the Link address type is "Computed from fields in the grid", this field appears. Click to define the link address in the Link Address Builder .

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

  • The page contains a Grid component named customers.
  • The table has a field named Customer_ID.
  • Alpha Anywhere .DBF Syntax 

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

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

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

  • 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 Anywhere 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.

Target frame or window 

The default is "Explicit". Defines where to display the linked page. The default is Null. The options are: Blank (opens in a new window) "Explicit", "WindowName" (e.g. "Window2"), "_blank", "_parent", "_self", "_search", "_top"

  • Clear Parameters - The default is .F. . Specifies whether the target URL preserves existing parameters.

  • Scroll to Detail View - The default is .T. . Specifies that the page should scroll down to display the detail view form when a record is selected.

An example of a displaying multiple field values as a link expression