Documentation Center

Understanding the use of conditions in metadata configuration

Introduction

The dialogs and list views are dynamically created from the metadata configuration XML. First, the correct dialog or list view is located using the ID attribute. Next, all referenced objects are included. Finally, the remaining XML is conditionally published.

Conditions are especially useful for dialogs such as property windows. For each combination of object type and ChangeMode, a new dialog is defined (e.g. ishfrm[@id="Properties_Create_ISHMasterDoc"]). In order to avoid duplicate declarations, you should reference each field that is used in multiple dialogs. Of course, sometimes there is still a minor difference between two definitions of the same field. This can be solved by adding conditions.

How should conditions be used?

  • Try to position your conditions on the smallest possible element.
  • Avoid using conditions on a tab page (ishfrmtab), a group (ishfrmgroup) or a field (ishfrmfield) unless the complete object must be removed or added in certain circumstances.

Which conditions are currently used?

ConditionsAllowed valuesDescription
ChangeModeCreate, Update

Deprecated: NewVersion

This condition can be used to
  • initialize a value when creating the object.
  • prevent the user from modifying a value on an existing object.
ClientName
The application name:
  • PublicationManager
  • ContentImporter
  • ConditionManager
  • AuthoringBridge
  • OrganizeSpace
  • DraftSpace
  • ReviewSpace

or

The name of a group the application belongs to:
  • CollectiveSpaces (which means DraftSpace and ReviewSpace)
  • ClientTools (which means AuthoringBridge, ConditionManager, ContentImporter and PublicationManager)
  • WebClients (which means OrganizeSpace, DraftSpace and ReviewSpace)
Use this condition when the layout, behavior or initial value of a field depends on the client application.
CreateReasonCheckInAs, Duplicate, Import, NewLanguage, NewObject, NewVersion

Specifies the reason why an object was created.

The condition can only be used when the ChangeMode condition is set to Create.

ISHTypeObject TypesUse this condition when the layout, behavior or initial value of a field depends on the object type.
MetadataConfigIdThe ID of any dialog (ishfrm) or list view (ishlist) in the metadata configuration XML.This condition is no longer used and can be replaced by a combination of ChangeMode and ISHType.
UserGroupAn element (e.g. VUSERGROUPSYSTEMMANAGEMENT, VUSERGROUPDEFAULTDEPARTMENT) or label (e.g. System Management, Default Department) of any user group.Use this condition to define user group specific properties (properties that are only available on objects owned by the user group).
UserRole

Deprecated: ISHUserCapability

An element (e.g. VUSERROLEADMINISTRATOR, VUSERROLEAUTHOR, VUSERROLEREVIEWER) or label (e.g. Administrator, Author, Reviewer) of any user role.Use this condition to restrict certain actions (e.g. overwriting a value) to specific user roles (usually the Administrator user role).
IsBatchBooleanValue indicating whether multiple objects are selected to update. true if multiple objects are selected to update; otherwise false.
IsReleasedBooleanValue indicating whether the object is released. true if the object is released; otherwise false.
OutputFormatAn element (e.g. VOUTPUTFORMATPDFA4MANUAL) or label (e.g. PDF (A4 Manual)) of any output format.Use this condition to define output format specific properties (properties that are only available for a specific output format).

Example 1

This example demonstrates how to prevent the user from modifying the required resolution on an existing publication.

<ishfrmfield name="PublicationResolutionField" ishfieldref="FISHREQUIREDRESOLUTIONS" level="version">
  <label resourceref="PublicationResolutionField.Label">Resolution</label>
  <description resourceref="PublicationResolutionField.Description">The resolution used for assembling the publication. </description>
  <typepulldown ishcondition="ChangeMode = 'Create'">
    <valuelist>
      <lovlist ishlovref="DRESOLUTION"/>
    </valuelist>
  </typepulldown>
  <typelabel ishcondition="ChangeMode = 'Update'"/>
</ishfrmfield>

Example 2

This example initializes different values depending on the object type.

<ishfrmfield name="TranslationManagementEnabledField" ishfieldref="FNOTRANSLATIONMGMT" level="logical" ishcondition="ISHType in ('ISHMasterDoc', 'ISHIllustration', 'ISHLibrary','ISHModule','ISHTemplate')">
  <label resourceref="TranslationManagementEnabledField.Label">Enable translation management</label>
  <description resourceref="TranslationManagementEnabledField.Description"/>
  <typecheckbox>
    <checkedvalue>No</checkedvalue>
    <uncheckedvalue>Yes</uncheckedvalue>
  </typecheckbox>
  <value overwrite="yes" ishcondition="ChangeMode='Create' and ISHType in ('ISHMasterDoc', 'ISHLibrary', 'ISHModule')">No</value>
  <value overwrite="yes" ishcondition="ChangeMode='Create' and ISHType in ('ISHIllustration', 'ISHTemplate')">Yes</value>
</ishfrmfield>