GetValue – PB Docs 2018

GetValue

method (DataWindows)

Description

Obtains the value of an item in a value list or code table
associated with a column in a DataWindow.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object, DataStore
object

Syntax

PowerBuilder

Argument

Description

dwcontrol

A reference to a DataWindow control, DataStore, or
child DataWindow.

column

The column for which you want the item. Column can be
a column number (integer) or a column name
(string).

index

The number of the item in the value list or the code
table for the edit style.

Return value

Returns the item identified by index in the value list or the code
table associated with column of dwcontrol. If the item has a display value
that is not the actual value, GetValue returns a tab-separated string
consisting of:

Returns the empty string (” “) if the index is not valid or the
column does not have a value list or code table.

If any argument value is null, in PowerBuilder and JavaScript the
method returns null.

Usage

You can use GetValue to find out the values associated with the
following edit styles: CheckBox, RadioButton, DropDownListBox, Edit Mask,
and Edit. If the edit style has a code table in which each value in the
list has a display value and a data value, GetValue reports both
values.

GetValue does not get values from a DropDownDataWindow code
table.

You can parse the return value by searching for the tab character
(ASCII 09). In PowerBuilder, search for ~t.

Examples

If the value list for column 7 of dw_employee contains Full Time,
Part Time, Retired, and Terminated, these statements return the value of
item 3 (Retired):

If the value list for the column named product of dw_employee is
Widget[tab]1, Gadget[tab]2, the following code returns Gadget[tab]2 and
saves the display value in a string variable:

See also

ClearValues

SetValue


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