Use FILL-WHERE-STRING to assign queries prior to FILL
- Last Updated: October 16, 2024
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
If you want to make a change dynamically to modify how FILL loads records into a dataset, you specify the FILL-WHERE-STRING attribute.
Work with the FILL-WHERE-STRING attribute on a data-source
The query for each buffer has a FILL-WHERE-STRING attribute. This attribute helps you determine the
query that is in effect at any given time. It also can be used to customize the
WHERE clause of the query prior to a FILL
operation.
FILL-WHERE-STRING value when
it prepares the query. During FILL, the AVM creates a default WHERE clause based on the defined query. For example,
the query might be on Order using a WHERE clause:
WHERE Order.ShipDate < TODAY.Customize FILL-WHERE-STRING
You also might want to supply more criteria to the WHERE clause. You can modify the FILL-WHERE-STRING attribute to reflect new criteria; this attribute
opens the query again to change the scope of records retrieved.
This technique is useful whenever you want to re-assign a new query before FILL. For example, you could create a number of different reports using the same dataset, but change the query each time to retrieve a different set of records.
FILL-WHERE-STRING value would
be: WHERE Order.CustNum = Customer.CustNum.FILL-WHERE-STRING as
follows:myString = DATA-SOURCE srcOrder:FILL-WHERE-STRING
+ " AND orderTotal > 1,000".
DATA-SOURCE srcOrder:FILL-WHERE-STRING = myString.Steps for customizing the FILL-WHERE-STRING
FILL-WHERE-STRING, follow these steps: - Add to the
FILL-WHERE-STRING. - Define a query to use the new criteria.
- FILL the dataset.
Example using a dynamic query
|