Syntax 3 – PB Docs 2018

Syntax 3

Description

Exports data from the specified buffer(s) and/or DataWindowChild
to a simple-format or standard-format JSON string.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object, and
DataStore object, except for those with the Composite, Crosstab,
OLE 2.0, or RichText presentation styles.

Syntax

PowerBuilder

Argument

Description

dwcontrol

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

primarydata

A boolean specifying whether to export the data
from the primary buffer.

  • True — to export

  • False — not to export

filterdata

A boolean specifying whether to export the data
from the filter buffer.

  • True — to export

  • False — not to export

deletedata

A boolean specifying whether to export the data
from the delete buffer.

  • True — to export

  • False — not to export

dwcdata

A boolean specifying whether to export the
DataWindowChild data.

  • True — to export. If it is to export the
    DataWindowChild data, data from all buffers will be
    exported to a simple-format JSON, regardless of the value
    of the other arguments.

  • False — not to export

format (optional)

A boolean specifying the JSON
format.

  • True indicates the standard format.

  • False indicates the simple format. The default is
    false.

See JSON formats for
details about the simple and standard format.

Return value

String. Returns the JSON string if it succeeds. Returns the empty
string (“”) if an error occurs.

The method returns null if any of the following:

  • any argument’s value is null

  • the DataWindow object (dataobject) is invalid

  • the DataWindow presentation style is unsupported, such as
    Composite, Crosstab, OLE 2.0, or RichText

Examples

This example exports the data from the primary buffer and the
filter buffer of the DataWindow to a simple-format JSON string:

This example exports the data from every buffer of the DataWindow
and the DataWindowChild to a standard-format JSON string:

See also

ImportJson

ImportJsonByKey


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