bottom

Text Expression

User Rating: / 4
PoorBest 

ExpressionGenPane

Purpose

This generator produces values from an expression composed of constant parts and function calls. Constant parts are delimited by double quote "

The value generated for an expression is evaluated for each record by replacing the function calls in the expression by their values.

For example, the function call RANGE(10,20) returns a numeric value between 10 and 20.

Suppose we have an expression which is

 "ABCD" RANGE(1,10) "EFG"

then its evaluation will be done in three parts: a constant ABCD, a random number between 1 and 10 and a constant EFG.

Possible sequence of generated values for this expression could be:

ABCD2EFG
ABCD10EFG
ABCD3EFG
ABCD2EFG
ABCD6EFG

Notice that spaces and any ohter additional text outside of double quotes are just ignored. This will be usefull to insert comments into your expressions. For example, this fully commented expression is equivalent to the previous one.

/* First part of the value is a constant prefix */
"ABCD" /* Second part of the value is a random number between 1 and 10 */ RANGE(1,10) "EFG" // This is the constant suffix of the value

Configuration

The configuration of an Expression rule is done only by writing the text of the expression. Every occurence of a known function's name with appropriate parameters will be replaced by the value of the function call each time the expression is iteself evaluated.

If you want to generate a word that is a function name without it being interpreted as a function call, just use the prefix '\', such as in ABCD\RANGE(1,10)EFG.

To learn how work all the available function visit the Expression Functions page.

Samples

Sample Expression Patterns
Expression Meaning Samples
"1 " DEC(3) "-" DEC(3) "-" DEC(3)
A canadian phone number
1 521-526-988
1 548-965-753

Add comment


Security code
Refresh