Set-Value-By

Description

Set-Value-By indicates how the value in the NameValue type should be set.

Parameters

Name Type Description
PRECEDENCE-VALUE string If the PRECENDENCE-VALUE is chosen, then the value will be set by looking at the values supplied in order of precedence.
INTERNAL-VALUE string Set the value using the internal value
UUID-VALUE string Set the value using the UUID value.
DISPLAY-VALUE string Set the value using the display value

Usage

If the PRECENDENCE-VALUE is chosen or the Set-Value-By parameter is omitted, then the value will be set by looking at the values supplied in order of precedence. The order is internal, uuid, followed by display. For example, if the internal value is present, it will be used. If the internal value is not present, the uuid value will be used. If neither the internal or uuid values are specified, the display value will be used.

You can use the setValueBy element to specify which type of value it is, though it is not required. The setValueBy element is mainly used if you are passing in an empty value. Otherwise, SBM will determine which type of value is set by checking for a non-empty value.

To set an empty value, you must use the SET-VALUE-BY parameter that corresponds to the empty <value> parameter. For example, to set an empty value for a field using the internalValue parameter, you could specify:

<urn:setValueBy>INTERNAL-VALUE</urn:setValueBy>
<urn:setValueMethod>REPLACE-VALUES</urn:setValueMethod>
<urn:value>
    <urn:internalValue></urn:internalValue>

Alternatively, to set an empty value for a field using the displayValue parameter, you could could specify:

<urn:setValueBy>DISPLAY-VALUE</urn:setValueBy>
<urn:setValueMethod>REPLACE-VALUES</urn:setValueMethod>
<urn:value>
    <urn:displayValue></urn:displayValue>
Note: To set an empty value for a Single or Multi-Relational field, you must use INTERNAL-VALUE in SetValueBy and empty tags in the internalValue parameter.

XML

The following XML shows Set-Value-By in the <urn:extendedField> element in a typical call.

<urn:extendedField>
    <urn:id>
        <urn:displayName>Severity</urn:displayName>
        <urn:id></urn:id>
        <urn:uuid></urn:uuid>
        <urn:dbName>SEVERITY</urn:dbName>
    </urn:id>
    <urn:setValueBy>PRECEDENCE-VALUE</urn:setValueBy>
    <urn:setValueMethod>REPLACE-VALUES</urn:setValueMethod>
    <urn:value>
        <urn:displayValue>High</urn:displayValue>
        <urn:internalValue>122</urn:internalValue>
        <urn:uuid>4ad0961d-30dc-4198-8167-5224dcb6c065</urn:uuid>
    </urn:value>
</urn:extendedField>