Documentation Center

Understanding ishvaluetype

Describes the usage and behavior of ishvaluetype

The usage and behavior of the ishvaluetype depends on the data type of the fields.

Using ishvaluetype inside requested metadata

  • When the field is linked with an external source via the metadata binding section of the XML Extension Settings, the value type can be used to indicate if you want to get the id/element of the external system which is saved inside the Content Manager database or the resolved label from the external system.
    Requested metadataResult
    <ishfield name="FCOUNTRIES" level="logical"/>
    
    <ishfield name="FCOUNTRIES" level="logical">
    Belgium, France, United Kingdom
    </ishfield>
    
    <ishfield name="FCOUNTRIES" level="logical" ishvaluetype="value"/>
    
    <ishfield name="FCOUNTRIES" level="logical" ishvaluetype="value">
    Belgium, France, United Kingdom
    </ishfield>
    <ishfield name="FCOUNTRIES" level="logical" ishvaluetype="element"/>
    
    <ishfield name="FCOUNTRIES" level="logical" ishvaluetype="element">
    BE, FR, GB
    </ishfield>
  • When the field contains a value of a list of values (e.g. FSTATUS, DOC-LANGUAGE) or a reference to another object (e.g. FAUTHOR), the ishvaluetype can be used to indicate if you want to get the unique numerical identifier (= id), the unique identifier (= element) or the label of the object.
    Requested metadataResult
    <ishfield name="FSTATUS" level="lng" ishvaluetype="value"/>
    <ishfield name="FAUTHOR" level="lng" ishvaluetype="value"/>
    <ishfield name="FSTATUS" level="lng" ishvaluetype="value">Draft</ishfield>
    <ishfield name="FAUTHOR" level="lng" ishvaluetype="value">MacGyver</ishfield>
    <ishfield name="FSTATUS" level="lng" ishvaluetype="element"/>
    <ishfield name="FAUTHOR" level="lng" ishvaluetype="element"/>
    <ishfield name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSDRAFT</ishfield>
    <ishfield name="FAUTHOR" level="lng" ishvaluetype="element">VUSERMACGYVER</ishfield>
    <ishfield name="FSTATUS" level="lng" ishvaluetype="id"/>
    <ishfield name="FAUTHOR" level="lng" ishvaluetype="id"/>
    <ishfield name="FSTATUS" level="lng" ishvaluetype="id">315</ishfield>
    <ishfield name="FAUTHOR" level="lng" ishvaluetype="id">120000</ishfield>
  • For all other field types, you will always get ishvaluetype "value".
    Requested metadataResult
    <ishfield name="FTITLE" level="logical"/>
    <ishfield name="MODIFIED-ON" level="lng"/>
    <ishfield name="FTITLE" level="logical">Introduction</ishfield>
    <ishfield name="MODIFIED-ON" level="lng">02/07/2014 12:21:57</ishfield>
    <ishfield name="FTITLE" level="logical" ishvaluetype="value"/>
    <ishfield name="MODIFIED-ON" level="lng" ishvaluetype="value"/>
    
    <ishfield name="FTITLE" level="logical" ishvaluetype="value">Introduction</ishfield>
    <ishfield name="MODIFIED-ON" level="lng" ishvaluetype="value">02/07/2014 12:21:57</ishfield>
    <ishfield name="MODIFIED-ON" level="lng" ishvaluetype="element"/>
    
    The logging will contain a warning with the following message:
    Field 'MODIFIED-ON' only supports ishvaluetype 'value'. The ishvaluetype 'element' will be ignored.
    The result will contain:
    <ishfield name="MODIFIED-ON" level="lng" ishvaluetype="value">02/07/2014 12:21:57</ishfield>

Using ishvaluetype inside metadata for creating or updating an object

  • When the field is linked with an external source via the metadata binding section of the XML Extension Settings, the value must be provided as id/element of that external source to ensure that there is a unique value saved in the Content Manager database.
    <ishfield name="FCOUNTRIES" level="logical" ishvaluetype="element">BE, FR, GB</ishfield>
  • When the field is linked with a list of values (e.g. FSTATUS, DOC-LANGUAGE) or references another object (e.g. FAUTHOR), the ishvaluetype must be used to indicate if the incoming value is the unique numerical identifier (= id), the unique identifier (= element) or the label. Since they are just different representation of the same unique value in the list of values, the value can be set using the 3 different value types:

    • value type "value"
      <ishfield name="FSTATUS" level="lng" ishvaluetype="value">Draft</ishfield>
      <ishfield name="FAUTHOR" level="lng" ishvaluetype="value">MacGyver</ishfield>
    • value type "element"
      <ishfield name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSDRAFT</ishfield>
      <ishfield name="FAUTHOR" level="lng" ishvaluetype="element">VUSERMACGYVER</ishfield>
    • value type "id"
      <ishfield name="FSTATUS" level="lng" ishvaluetype="id">315</ishfield>
      <ishfield name="FAUTHOR" level="lng" ishvaluetype="id">1200</ishfield>
  • All other field types only support value type "value".

Using ishvaluetype inside a metadata filter

  • When the field is linked with an external source via the metadata binding section of the XML Extension Settings, the value used inside the metadata filter must be provided as id/element of the external source because that is the value which is saved in the Content Manager database.
    <ishfield name="FCOUNTRIES" level="logical" ishvaluetype="element" ishoperator="in">BE, FR, GB</ishfield>
  • When the field is linked with a list of values (e.g. FSTATUS, DOC-LANGUAGE) or references another object (e.g. FAUTHOR), the ishvaluetype must be used to indicate if the filter contains the unique numerical identifier (= id), the unique identifier (= element) or the label.

    Since the different value types point to the same object inside the database, any value type can be used in the filter unless the operator is the "like" operator which cannot be used in combination with value type "id". So, the following 2 filters will both return language objects with a status "Draft":
    <ishfield name="FSTATUS" level="lng" ishvaluetype="element">VSTATUSDRAFT</ishfield>
    <ishfield name="FSTATUS" level="lng" ishvaluetype="value" ishoperator="equal">Draft</ishfield>
  • All other field types only support value type "value".