Examples
This section illustrates some expressions as they might be used in iProcess
procedures without functions. (See the next section for functions.)
|
•
|
Test that the field of an iProcess Table record variable has defined contents: |
TABTAG:TABFIELD <> SW_NA
|
•
|
Test if the user of this procedure is "JOHN": |
SW_USER:NAME = "JOHN"
|
•
|
Calculate the total price based on number of items, unit cost and VAT rate: |
(NUM_UNITS * UNIT_PRICE) * VAT_RATE
|
•
|
Test if an order exceeds a customer’s credit limit, defined in an iProcess Table: |
TOTAL_VALUE >= CUST_REC:CREDIT_LIM
|
•
|
Produce a composite name from components, for example "Mr. John Smith": |
EMPLOYEE:SALUTATION + " " + EMPLOYEE:FNAME + " " + EMPLOYEE:LNAME
|
•
|
Calculate a date 3 months from now: |
SW_DATE + @0/0/3/0@
|
•
|
Test if someone is old enough in an application procedure: |
(SW_DATE - DATE_OF_BIRTH) > ((AGE_LIMIT * 365) + (AGE_LIMIT / 4))