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

Syntax for selected data in a named column – PB Docs 2019 – PowerBuilder Library

Syntax for selected data in a named column – PB Docs 2019

Syntax for
selected data in a named column

Description

A DataWindow data expression uses the Selected property to access
values in a named column or computed field for the currently selected
rows. Selected data is always in the primary buffer.

Syntax

Parameter

Description

dwcontrol

The name of the DataWindow control or child
DataWindow in which you want to get or set data.

columnname

The name of a column or computed field in the
DataWindow object in dwcontrol. If the column or computed field
does not exist at runtime, an execution error
occurs.

datasource

(optional)

The source of the data. Values
are:

  • Current — (Default) The current values in the
    DataWindow control.

  • Original — The values that were initially retrieved
    from the database. For a computed field, you must specify
    Original (because computed fields cannot be changed and do
    not have current values).

Return value

The datatype of the expression is Any. The expression returns an
array of values with the datatype of columnname.

Usage

When you specify selected values, the expression always returns an
array and you must assign the result to an array, even if you know there
is only one row selected.

For selected rows, the primary buffer is the only applicable
buffer. For consistency, you can include Primary in this syntax but it
is not necessary.

Examples

Because the primary buffer is the only applicable buffer for
selected data and current data is the default, these expressions are all
equivalent. They access values in the emp_name column for selected
rows:

These expressions both access original values for selected
rows:

This example sets the emp_name value in the first selected row to
an empty string. The rest of the selected rows are set to a default
value, which can be an empty string:

This statement gets the original emp_name values in selected rows
and assigns them to an array of strings:


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