Connector Framework Server 23.2

# IfField

The `<IfField>` element makes operations conditional on the presence of a metadata field.

Using `<IfField>` does not change the context (the current position in the document).

Attribute | Description
--- | ---
`name` | The name of an existing field.
`nameRegex` | A regular expression to match the name of one or more existing fields.
`path` | The path of an existing field.
`pathRegex` | A regular expression to match the path of one or more existing fields.
`negate` | Set this attribute to `true` to perform the child operations only when there are no matching fields.

The following attributes filter the matching fields by their values:

Attribute | Description
--- | ---
`containsRegex` | The field value must contain a match to this regular expression.
`matches` | The field value must match this value exactly.
`matchesRegex` | The whole field value must match this regular expression.
`matchType` | Specifies the conditions necessary for the child operations to be performed: `all` - all fields selected by name or path must have the specified value. `any` - one or more of the fields selected by name or path must have the specified value. `none` - none of fields selected by name or path must have the specified value.

In the following example, the field "anotherField" is deleted, but only if the document contains a field named "myField" with the value "ERROR". The `<IfField>` element does not change the context, so "anotherField" is deleted from the root of the document (it is not a subfield of "myField").

    <FieldStandardization>
        <IfField name="myField" matches="ERROR">
             <Field name="anotherField">
                 <Delete/>
             </Field>
        </IfField>
    </FieldStandardization>

Copyright 2023 Open Text
Version 23.2 | Last updated March 2023

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Connector Framework Server 23.2

Topic Title: IfField