Running jobs : Using parameters : Making expressions for ad hoc parameters
 
Making expressions for ad hoc parameters
The value of an ad hoc parameter can be a single value or an expression. Expressions use special characters called operators to select a group or range of values. For example, a greater than sign (>) specifies matching a value that is greater than the value that follows the symbol, as in >10. In this example, the greater than sign is the operator and 10 is the value.
The type of ad hoc parameter available to Information Console users is a dynamic filter. Dynamic filters request users to build expressions using a single operator.
Examples of using expressions in an ad hoc parameter:
*A single value, such as 10.
*A relational expression, such as >10.
*A range of values, such as 10–20.2.
Dynamic filters are used in BIRT design and document files.
Using a dynamic filter operator
Dynamic filters appear in BIRT design and document files. When dynamic filters exist in an Actuate file, Information Console prompts the user to select from a list of operators and supply a value. The developer decides which operators are available in an Actuate file.
Dynamic filters support multiple values and complex string expressions, depending on the operator. Data matching this expression displays in the output document of the file job.
Figure 3‑11 shows an example of using dynamic filter operators to make an ad hoc expression.
Figure 3‑11 Using dynamic filters
Table 3‑3 lists the operators that are available in Actuate files. Developers select which operators are available to users of the file.
Table 3‑3 Dynamic filter operators
Operator
Usage
Between
Find data that is between two specific values.
Equal to
Find data equal to a specific value.
Greater than
Find data greater than the specific value.
Greater than or equal to
Find data greater than or equal to the specific value.
In
Find data that matches any of the selected values.
Is false
Find data that equals zero.
Is not null
Find data that does not have a null value.
Is null
Find data that has a null value.
Is true
Find data that does not equal zero.
Less than
Find data less than the specific value.
Less than or equal
Find data less than or equal to the specific value.
Like
Find data matching the value’s string pattern.
Match
Find data matching the value’s string expression.
No condition
Find all values for this parameter.
Not between
Find data that is not between two specific values.
Not equal to
Find data not equal to a specific value.
Not in
Find data that does not match any of the selected values.
Not like
Find data not matching the value’s string pattern.
Not match
Find data not matching the value’s string expression.
The Like operator supports the following special characters:
*% matches zero or more characters. For example, %ace% matches any value that contains the string ace, such as Ace Corporation, Facebook, Kennedy Space Center, and MySpace.
*_ matches exactly one character. For example, t_n matches tan, ten, tin, and ton. It does not match teen or tn.
The Match operator is case-sensitive and supports special metacharacters that combine to form text patterns called regular expressions. For example, using ^H.*(Gifts|Collectables)$ to search through a list of company names matches all companies whose name starts with the letter H, has one or more letters after H and includes the word Gifts or Collectables at the end of the name.
If you need to match on a metacharacter, a backslash (\) followed by the metacharacter causes the search to interpret the metacharacter as a normal character.
For example, if $ is part of the data to be found, it must be entered as \$ because $ is a metacharacter.
Table 3‑4 lists the metacharacters available to form regular expressions with the Match operator. Table 3‑5 provides examples of dynamic filter expressions.
Table 3‑4 Regular expression metacharacters used with Match
Metacharacter
Usage
.
Matches any single character.
*
Matches the previous character zero or more times. For example, po* matches Liverpool and Leipzig.
!
Matches everything not equal to the search expression.
( )
Matches all characters in the set between the parentheses.
|
Matches if any one of multiple conditions is true.
[]
Matches any character in the set between the brackets.
[^ ]
Matches any character not in the set between the brackets.
+
 
Matches the previous character one or more times. For example, po+ matches Singapore and Liverpool but not Leipzig.
?
Matches the previous character zero or one times. For example, po? matches Singapore and Leipzig.
x{y}
Matches the previous character exactly y times. For example, o{2} matches Liverpool but not Lyon.
^
Matches the start of the string. For example ^A matches Australia but does not match Los Angeles.
$
Matches the end of the string. For example n$ matches Lyon.
\
Used with a metacharacter to make it a literal character. For example, to search for a string containing a $ sign, use \$.
\A
Matches the start of a string.
\b
Matches the edge of a word, beginning, or end.
\B
Matches any place inside a word, but not the edge of a word.
\d
Matches any decimal digit.
\D
Matches any non digit character.
\s
Matches a space.
\S
Matches a non‑space.
\w
Matches a word that is made of letters, numbers, or an underscore.
\W
Matches a non-word.
\Z
Matches the end of a string.
Table 3‑5 Example results for dynamic filter expressions
Operator
Values
Matches
Does not match
Between
'A'
'D'
'Barcelona'
'Dublin'
'Zurich'
'Seattle'
Greater than
'Oslo'
'Oulu'
'Paris'
'Oslo'
'NYC'
In
'Lyon'
'New York'
'Lyon'
'New York'
'London'
'New Haven'
Is false
 
'0'
'11'
Like
'A%'
'Amsterdam'
'Auckland'
'Zurich'
Like
'B___'
'Bern'
'Berlin' or 'Boston'
Like
'Be%n'
'Berlin' or 'Bern'
'Bergamo'
Like
'%& Co%n'
'Handji Gifts& Co'
'Models & Co.'
'Boards & Toys Co'
'Cruz & Sons Co.'
Match
'es.'
'Manchester'
'Nantes'
Match
'ity'
'City'
'Makati City'
'Nantes'
'Paris'
Match
'ern'
'Stavern'
'Bern'
'Liverpool'
'Bergen'
Match
'(ern)|(New)'
'Bern'
'Newark'
'New Bedford'
'Glendale'
'Cunewalde'
Match
'A'
'Allentown'
'Los Angeles'
'Nantes'
'Paris'
Match
'.A'
'Los Angeles'
'Allentown'
Match
'[A-C]'
'Burbank'
'Los Angeles'
'NYC'
'Frankfurt'
'Singapore'
Match
L[^o]s
'Lisboa'
'Los Angeles'