GetKey
PowerScript function
Description
Gets the key name.
Applies to
Syntax
|
1 |
objectname.GetKey ( Index ) |
|
Argument |
Description |
|---|---|
|
objectname |
The name of the JSONPackage object whose key you want to |
|
Index |
A long value specifying the index of the key. |
Return value
String.
Returns the key name if it succeeds and empty string (“”) if an
error occurs. If any argument’s value is null, the method returns
null.
Example
This example gets the number of keys first and then gets the name of
each key.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
long ll_index, ll_KeyCount string ls_KeyName datastore lds_employee datawindowchild ldwc_active JsonPackage lnv_package lnv_package = create JsonPackage ...//Initialize data for lds_employee, ldwc_active // package the data lnv_package.SetValue("d_department", dw_department, false) lnv_package.SetValue("d_employee", lds_employee) lnv_package.SetValue("dddw_active", ldwc_active, false) ll_KeyCount = lnv_package.KeyCount() for ll_index = 1 to ll_KeyCount ls_KeyName = lnv_package.GetKey(ll_index) … next |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest