GetPathByItem
PowerScript function
Description
Gets the path of the item.
Applies to
Syntax
|
1 |
objectname.GetPathByItem ( ItemHandle ) |
|
Argument |
Description |
|---|---|
|
objectname |
The name of the JSONGenerator object whose path you want |
|
ItemHandle |
A long specifying the handle of the item. |
Return value
String.
Returns the item path if it succeeds. If any argument’s value is
null, the method returns null. If an error occurs, the method returns the
exception.
Examples
This example determines the item path according to the item handle
and then adds three child items:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Long ll_Object String ls_RootPath,ls_ObjectPath JsonGenerator lnv_JsonGenerator lnv_JsonGenerator = Create JsonGenerator // Creates an object root item lnv_JsonGenerator.CreateJsonObject () // Adds an object child item ls_RootPath = "/" ll_Object = lnv_JsonGenerator.AddItemObject(ls_RootPath, "object") ls_ObjectPath = lnv_JsonGenerator.GetPathByItem(ll_Object) lnv_JsonGenerator.AddItemNumber(ls_ObjectPath, "year", 2017) lnv_JsonGenerator.AddItemDate(ls_ObjectPath, "date", 2017-09-21) lnv_JsonGenerator.AddItemTime(ls_ObjectPath, "time", 12:00:00) |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest