Tip>Designer

Dynamically filter the records in a DataLink

 

Article #:

0016

Contributor:

Joanne Irvine-Smith

GF version:

3.05

Applies to:

Records in a DataLink

Last updated:

October 15, 2001

Description

Dynamically filter the records in a DataLink, thereby limiting the list of records presented to a user at run time.

Explanation

You can set a filter on a DataLink from within a FillPoint. This filter is then set each time the template is run, and a list of filtered records is presented to the user in the data selection interface.

 

Click here to view a step-by-step example.

To create a FillPoint that sets a filter, do the following:

  1. In the GhostFill FillPoint Editor, send the SetFilter task to the editing area. The contents of the FillPoint are displayed as follows:

  1. Expand the FillPoint.

  2. The first parameter is a Field Name, e.g. click the parameter and type 'Date Effective' in quotes.

  3. The second parameter is the Comparison argument e.g., click the parameter and type '=' in quotes.

 

NOTE

For a list of constants that are valid for this argument, see the Databases folder in the Tasks tab (see the GhostFill Scripting Language Guide for a detailed description of the SetFilter Constants).

 

  1. The third parameter is the field's Value,e.g. click the parameter and type Date().

  2. The contents of the SetFilter FillPoint are as follows:

 

  1. The FillPoint inserted into the template will be as follows:

%[DataServerVariable.SetFilter('Date Effective', '=', Date())]

At run time, this FillPoint will filter the records in the data source to include only those records where the Date Effective field equals the system date. The records that fit these specifications will be displayed in the data selection interface.

 

Template Example