Defining default values
Filter definitions can be used to automatically enter default values when creating new records.
You can use catalog values, constants, $cur
expressions and $par
expressions (i.e. variables that are determined by a parent record).
For a complete description of the $
expressions (syntax and examples), see $cur expressions.
Boolean Fields
Any value except "N" evaluates to true.
Date/Time filters
In addition to $cur
expressions ($curRep
,
$curDay
, etc.) you can use $par
expressions to get dates and times from
parameters, e.g. $parDay:fdWeek
is the
first day of the parameter's week. The parameters are defined in the info area's default
List control/ see Variable Defaults.
You can use date and time calculations for both $cur
and $par
expressions:
-
$curDay+1y+1d
evaluates to tomorrow next year -
$parDate:fdWeek+7d
evaluates to first day of the week ofDate
plus 7 days.
Multiple Default Values
You can define multiple default values (fallbacks) for one field by adding $onlyFirst
as the first value:
The first expression that does not evaluate to null (or empty) is used. In the above example: If the parameter Date
is defined and has a value (i.e. not empty), it is used. If Date
is undefined or empty, the current date is used.