Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

If – PB Docs 2022 – PowerBuilder Library

If – PB Docs 2022

If

DataWindow expression function

Description

Evaluates a condition and returns a value based on that
condition.

Syntax

Argument

Description

boolean

A boolean expression that evaluates to true or
false.

truevalue

The value you want returned if the boolean expression
is true. The value can be a string or numeric
value.

falsevalue

The value you want returned if the boolean expression
is false. The value can be a string or numeric
value.

Return value

The datatype of truevalue or falsevalue. Returns truevalue if
boolean is true and falsevalue if it is false. Returns null if an error
occurs.

Examples

This expression returns Boss if salary is over $100,000 and Employee
if salary is less than or equal to $100,000:

This expression returns Boss if salary is over $100,000, Supervisor
if salary is between $12,000 and $100,000, and Clerk if salary is less
than or equal to $12,000:

In this example of a validation rule, the value the user should
enter in the commission column depends on the price. If price is greater
than or equal to 1000, then the commission is between .10 and .20. If
price is less than 1000, then the commission must be between .04 and .09.
The validation rule is:

The accompanying error message expression might be:

See also

Example 1: counting null
values in a column

Example 2: counting
active and terminated employees

Example 3: creating a row
indicator

Example 4: displaying all
data when a column allows nulls

Case


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x