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

Evaluating conditional DataWindow expressions with current data – PB Docs 2021 – PowerBuilder Library

Evaluating conditional DataWindow expressions with current data – PB Docs 2021

Evaluating
conditional DataWindow expressions with current data

Querying a property for a
column

Values for column properties normally apply to all the rows in the
column. For example, if you set the Protect property to “1” for the Emp_Id
column, the user will be unable to modify Emp_Id for any of the rows. If
you query the property value for this column at runtime, it will return
“1”.

When the column has a conditional
expression

Instead of a constant, you can assign a conditional expression to
some column properties. Such properties are set on a row-by-row basis at
runtime.

For example, you might wish to allow users to enter an employee id
for new rows but protect this value for existing rows. The conditional
expression for this column’s Protect property would be:

When you query the Protect property at runtime, the result in this
case would be the actual expression (preceded by a default value and a tab
character and enclosed in quotes) instead of the property value. The value
for the Protect property would be:

Getting a property value for a particular
row

To obtain the actual value of the Protect property for a particular
row, you need to strip off the default value and the tab and evaluate the
returned expression for the desired row. After stripping off the extra
information, you can construct an expression for Describe that uses the
Evaluate function.

This example checks whether the value of the Protect property for
emp_id is a constant or a conditional expression. If it is a conditional
expression, the script builds a string for the Describe function that uses
Evaluate to get the value for of Protect for the current row:


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