setProperties( ) method
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Replaces all user-defined properties in the current JSDO instance with the user-defined properties defined in the specified object.
Return type:
null
Applies to: progress.data.JSDO class
Syntax
|
- propsObject
- An
Objectcontaining a comma-separated list ofname, valuepairs that define the complete set of user-defined properties in the current JSDO, where name and value define a single property as defined for thesetProperty( )method. The properties defined in propsObject entirely replace all other user-defined properties previously defined in the JSDO. You can also remove all existing user-defined properties from the JSDO by specifying{}as the value of propsObject.
"server.count" has a reserved
usage in JSDO plugins. For more information, see the description of the responseMapping function that you can define using the addPlugin( ) method. Example
The following code fragment sets the "prop1" user-defined property in jsdoCustOrders
to the value "12345". It then calls setProperties( ) to
replace all of the existing user-defined properties in jsdoCustOrders with definitions for the two user-defined properties, "prop2" and "prop3" and writes
the current values of "prop1", "prop2", and "prop3" to the console log:
|
The output from the console.log
statements in this example appear as follows:
|
Note that the value returned and written out for "prop1"
is undefined, because a user-defined property with that name is no longer
defined in the JSDO.