HubSpot Connector 25.2
HubSpot Connector Help

# IfVar

The `<IfVar>` element makes operations conditional on whether a variable exists and optionally matches a given value.

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

Attribute | Description
--- | ---
`containsRegex` | The variable must contain a match to this regular expression.
`matches` | The variable must match this value exactly.
`matchesRegex` | The variable must match this regular expression.
`negate` | Set this attribute to `true` to perform the child operations when the variable does not exist or does not match a given value.
`var` | The name of the variable to check.

The following example adds a field to the document metadata when the value of a variable named "reference" matches a regular expression.

    <FieldStandardization>
        <IfVar var="reference" matchesRegex="http.*">
            <AddField name="referenceUrl" value="$(reference)" />
        </IfVar>
    </FieldStandardization>

Copyright 2025 Open Text
Version 25.2 | Last updated April 2025

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: Knowledge Discovery HubSpot Connector 25.2

Topic Title: IfVar