IDOL Content Component 24.3

# data

The field values to replace or delete in IDOL Server. Specify the target documents, fields, and field values as follows:

    #DREALL or #DREDBNAME databaseName or #DREDOCID id or #DREDOCREF url or #DRESTATEID stateID
    #DREFIELDNAME fieldName
    #DREFIELDVALUE fieldValue
    #DREFIELDVALUEIFNOTFOUND fieldValue
    #DREFIELDVALUEIFNOFIELD fieldValue
    #DREDELETEFIELDVALUE fieldValue
    #DREDELETESINGLEFIELDVALUE fieldValue
    #DREDELETEFIELD fieldName
    #DREFIELDBITOR value (or #DREFIELDBITAND value or #DREFIELDBITXOR value)
    #DREENDDATA

where,

Field | Description
--- | ---
`#DREALL` | Match all documents. This option is restricted only by the DatabaseMatch parameter supplied as part of the DREREPLACE request, or by database read-only status.
`#DREDBNAME databaseName` | The databases in which to match all documents. To specify more than one database, separate them with plus signs (+). IDOL Server ignores the DatabaseMatch parameter for the documents identified by `#DREDBNAME.`
`#DREDOCID id` | The ID of the document containing the field to change or delete.
`#DREDOCREF url` | The reference of the document containing the field to change or delete.
`#DRESTATEID stateID` | The stored state ID of an array of documents containing the field to change or delete. The state ID returns from a Query where StoreState`=True`.
`#DREFIELDNAME fieldName` | The name of the field whose value to change or delete. NOTE: In XML documents, `fieldName` must be fully qualified (for example, `XML/DOCUMENT/MYFIELD`).
`#DREFIELDVALUE fieldValue` | The new value for the field specified by `fieldName` .
`#DREFIELDVALUEIFNOTFOUND fieldValue` | The new value for the field specified by `fieldName` if the `fieldName`/``fieldValue`` pair does not already exist.
`#DREFIELDVALUEIFNOFIELD fieldValue` | The new value for the field specified by `fieldName` if the `fieldName` does not already exist in the document.
`#DREDELETEFIELDVALUE fieldValue` `#DREDELETENOCASEFIELDVALUE fieldValue` | The value that the field specified by `fieldName` must contain for the field to be deleted. By default, the value matching is not case sensitive (the `NOCASE` specifier is optional), but you can use `#DREDELETECASEFIELDVALUE` to match case sensitively.
`#DREDELETECASEFIELDVALUE fieldValue` | The value (case sensitive) that the field specified by `fieldName` must contain for the field to be deleted.
`#DREDELETESINGLEFIELDVALUE fieldValue` `#DREDELETESINGLENOCASEFIELDVALUE fieldValue` | The value that the field specified by `fieldName` must contain for IDOL Server to delete it. This option deletes only the first instance of the `fieldName`/`fieldValue` pair. By default, the value matching is not case sensitive (the `NOCASE` specifier is optional), but you can use `#DREDELETESINGLECASEFIELDVALUE` to match case sensitively.
`#DREDELETESINGLECASEFIELDVALUE fieldValue` | The value (case sensitive) that the field specified by `fieldName` must contain for IDOL Server to delete it. This option deletes only the first instance of the `fieldName`/`fieldValue` pair.
`#DREDELETEWILDFIELDVALUE fieldValue` `#DREDELETEWILDCASEFIELDVALUE fieldValue` | The Wildcard value that the field specified by `fieldName` must contain for the field to be deleted. This operation matches wildcards for UTF-8 (that is, `?` matches a single UTF-8 character). By default, the value matching is case sensitive (the `CASE` specifier is optional), but you can use `#DREDELETEWILDNOCASEFIELDVALUE` to match case insensitively.
`#DREDELETEWILDNOCASEFIELDVALUE fieldValue` | The Wildcard value (case insensitive) that the field specified by `fieldName` must contain for the field to be deleted. This operation matches wildcards for UTF-8 (that is, `?` matches a single UTF-8 character).
`#DREDELETESINGLEWILDFIELDVALUE fieldValue` `#DREDELETESINGLEWILDCASEFIELDVALUE fieldValue` | The Wildcard value that the field specified by `fieldName` must contain for the first instance of the field to be deleted. This operation deletes only a single instance of the `fieldName`/`fieldValue` pair. It matches Wildcards for UTF-8 (that is, `?` matches a single UTF-8 character). By default, the value matching is case sensitive (the `CASE` specifier is optional), but you can use `#DREDELETESINGLEWILDNOCASEFIELDVALUE` to match case insensitively.
`#DREDELETESINGLEWILDNOCASEFIELDVALUE fieldValue` | The Wildcard value (case insensitive) that the field specified by `fieldName` must contain for the first instance of the field to be deleted. This operation deletes only a single instance of the `fieldName`/``fieldValue`` pair. It matches Wildcards for UTF-8 (that is, `?` matches a single UTF-8 character).
`#DREDELETEFIELD fieldName` | The field to delete. You do not require a `#DRE*VALUE` parameter.
`#DREFIELDBITOR value` | Generally a 32-bit decimal integer. If this field is a NumericType field with the NumericIntegerOnly property, then the value is a signed 64-bit integer. If the field is a BitFieldType field, the value must be a hexadecimal value. IDOL Server performs the bit-wise or operation on the field identified by the previous `#DREFIELDNAME`. For NumericType fields, if the field is not present in the document, then it adds a field with value `0000000000` first, and then applies the bit operation.
`#DREXMLFIELDVALUE` | A block of XML data to insert into an XML document under the previous `#DREFIELDNAME`.
`#DREENDDATA` | This string must exist at the end of a index action parameter block to signify the end of the data.

Notes:

- To specify multiple terms, use the following guidelines for separators:

  - `DREDOCREF` uses unencoded plus signs (`+`) and unencoded spaces as separators.

  - `DREDOCID` uses unencoded plus signs (`+`) and unencoded spaces as separators.

  - `DRESTATEID` uses unencoded commas (`,`) as separators.

- Percent-encode each reference once, with the exception of separators.

- Set ReplaceAllRefs to `True` to perform actions upon multiple documents.

- OpenText generally recommends that you do not replace values in Index fields, because IDOL Content Component must reindex the documents being changed, which can slow the update process. Changes to numerical fields, numerical date fields, or fields with other properties, occur without reindexing, and so occur quickly.

- You cannot use `DREREPLACE` to update the values in SecurityType fields.

Actions: | DREREPLACE
Type: | String
Default: |
See Also: | Query and StoreState parameter

## Example

    DREREPLACE?DATABASEMATCH=News+Archive HTTP/1.0\n
    Content-Length:203\n\n
    #DREDOCID 1\n
    #DREFIELDNAME Price\n
    #DREFIELDVALUE 10\n
    #DREFIELDNAME Color\n
    #DREFIELDVALUE Red\n
    #DREDOCREF http://www.example.com/dynamic/autopage442.shtml\n
    #DREFIELDNAME Country\n
    #DREFIELDVALUE UK\n
    #DREFIELDNAME Region\n
    #DREFIELDVALUE South East\n
    #DREFIELDNAME OnSale\n
    #DREDELETEFIELDVALUE Yes\n
    #DRESTATEID abcdefg-6\n
    #DREFIELDNAME Fruit\n
    #DREFIELDVALUEIFNOTFOUND mango\n
    #DREDELETESINGLEFIELDVALUE apple\n
    #DREDELETEFIELD XML/DOC/DELETEME\n
    #DREENDDATANOOP\n\n

In this example, the DREREPLACE makes the following changes in the `News` and `Archive` databases.

- In the document with the ID 1:

  - The value of the `Price` field is changed to `10`.
  - The value of the `Color` field is changed to `Red`.

- In the document with the reference `http://www.example.com/dynamic/autopage442.shtm`l:

  - The value of the `Country` field is changed to `UK`.

  - The value of the `Region` field is changed to `South East`.

  - The field `OnSale` is removed from the document if it has the value `Yes`.

- In the document(s) referenced in the state ID `abcdefg-6`:

  - The value of the `Fruit` field is changed to mango if the `Fruit/mango` pair does not already exist.

  - If the `Fruit` field contains the value `apple`, a single instance of the `Fruit/apple` pair is deleted.

  - All instances of the `XML/DOC/DELETEME` field are deleted.

- `#DREENDDATANOOP` marks the end of the index action parameters.

Copyright 2024 Open Text
Version 24.3 | Last updated June 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL IDOL Content Component 24.3

Topic Title: data