IPWorks Cloud 2020 Node.js Edition

Questions / Feedback?

MetadataModOp Property

The modification operation to perform on the metadata item.

Syntax

 box.getMetadataModOp(index, [callback])
 box.setMetadataModOp(index,  metadataModOp, [callback])

Possible Values

  0 (opNone), 
  1 (opAdd), 
  2 (opReplace), 
  3 (opCopyFrom), 
  4 (opMoveFrom), 
  5 (opRemove), 
  6 (opTest)

Default Value

0

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getMetadataModOp([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setMetadataModOp([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

The modification operation to perform on the metadata item.

This property specifies which modification operation should be performed for the metadata item when UpdateMetadata is called. Possible values are:

0 (opNone - default) No-Op (the class skips the metadata item).
1 (opAdd) A new metadata item will be added. If one already exists with the specified MetadataName, its value will be overwritten.
2 (opReplace) The metadata item with the given MetadataName (which must already exist) will have its value overwritten.
3 (opCopyFrom) A new metadata item will be added, its value copied from the item specified by MetadataSourceName (which must already exist).
4 (opMoveFrom) A new metadata item will be added, its value moved from the item specified by MetadataSourceName (which must already exist). The source item will then be removed.
5 (opRemove) The metadata item with the given MetadataName (which must already exist) will be removed.
6 (opTest) Will verify that the metadata item with the given MetadataName (which must already exist) has the specified MetadataValue.

Refer to UpdateMetadata for more information.

The index parameter specifies the index of the item in the array. The size of the array is controlled by the MetadataCount property.

This property is not available at design time.

Data Type

Integer

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Node.js Edition - Version 20.0 [Build 8265]