Toggle menu

Object Types

This section of iCM lets you define Object Types. iCM forms are also backed by their own types, prefixed by FORM_ and generated automatically when you publish a form, but these are not displayed in the browser as they cannot be edited, except via the forms designer.

In most cases we don't recommend manually creating Object Types. Because types and properties are generated by the forms designer, creating a form to manage a type definition is a simpler way to achieve the same thing. There's more information about how forms use objects in the Forms and External Type Definitions article.

What are Object Types?

Object Types can be thought of as containers that define the structure of some data. Within each Type is a set of Properties. Properties define the data that should be stored within them.

For example an Object Type could be created to hold information about a waste subscription service, with a property for each thing we need to store:

An object type with four properties
 

Object Types and Properties generated by iCM Forms cannot be directly edited. Use the iCM Forms Designer instead.

Public Object Types are available for use by the site or iCM. Private Object Types are used internally by iCM, for example to hold article extra data.

Creating an Object Type

An Object Type is the name given to a defined set of Properties. Object Types with no Properties would serve no purpose, just as Properties cannot exist except as the defined "parts" of an Object.

Right-click on either the "Public" or "Private" folder to create a new Object Type Definition.

The label is the name that will be used to identify Objects of this Type. It must be unique and may only contain alphanumeric characters. The description should be something meaningful to help other users understand the purpose of Objects of this Type.

Choose whether the Type should be Public or Private (available only within iCM).

Finally click "Save this type" in the action panel.

Creating Properties

The Properties of an Object Type are most easily understood when compared to those generated by iCM Forms. Just as an iCM Form contains a number of fields, and each field defines the data it captures (text, number, date etc), an iCM Object Type contains a number of Properties, and these Properties may be strings, numbers, dates etc.

To create a new Property, right click on the Object Type for which a new Property is needed.

The name of the Property is used to identify the values of the data this Property defines. The name may only contain alphanumeric characters and must be unique within this Object Type. For example, there may be an Object Type called "Personal Details" which contains a Property called "Age". There may be another Object Type called "My Pet Dog" which also has a Property "Age", but as these are Properties of different Object Types, there is no conflict.

The Property's Data Type defines the kind of data represented by the Property. The options are:

  • String - a string
  • String (asset list) - a list of iCM assets. The asset type (Articles, Media etc) should be selected form the Sub-format drop-down
  • String (date time) - The date format can be defined via the Sub-format drop-down. If no sub-format is chosen a full UTC date-time string will be assumed
  • String (file) - the path to a file
  • String (location) - a Latitude/Longitude point, separated by a comma, eg 51.5061781974,-0.1381874084
  • Integer - a whole number
  • Integer (asset) - the ID of an iCM asset. The asset type (Article, Media etc) should be selected form the Sub-format drop-down
  • Number - a number
  • Object - adds a reference to another Object type that has already been defined. The Object Type should be selected from the drop-down list.

For non-Object Properties it is also possible to define a user friendly label, a default value and whether or not the contents of this Property should be indexed in the search collection. Should an existing Property be changed to "Searchable" the Object Collection will need to be reindexed for existing data to be returned.

Importing and Exporting Type Definitions

Object Type Definitions can be exported form one iCM installation and imported into another. As with most content items, it's fine to export from an older to a newer release of iCM, but you shouldn't export from 10.0.7.0 and import into 10.0.6.0.

Right-click on the Object Type and choose "Export this type" from the context menu. This will create and download a .export file that can be imported into another iCM.

To import a Type Definition right click on the OBJECT TYPES Explorer Root and choose "Import a type..." from the context menu. Select the .export file you would like to import and click "Run this import now" from the left hand Action Menu. The Object Type will be placed in either the Public or Private folder, as specified in the Type Definition.

Exporting All Objects of a Type

Exporting all Objects of a particular Type exports the data/values that have been written to the iCM Database.

Right-click on the Object Type that defines the data you would like to export and choose "Export all objects of this type" from the context menu. iCM will display information about the export, including the number of Objects of that Type. Click "Continue" in the left hand Action Menu to perform the export. Where a large amount of data has been selected a progress bar will be displayed.

The data is exported in xml format.

Deleting Type Definitions

Take care when deleting a Type Definition. While iCM will warn you about types that are being used by other parts of iCM, it's impossible to check if they are being referenced in End Points, or other scripts, which may rely on them.

To delete a definition, right-click on it and choose "Delete this type".

You won't be able to delete a type if:

  • It's been generated and is in use by a form (the form must be deleted first)
  • Its being used by a form as its external type (change the external type the form uses first)
  • There are any objects of this type (form data objects can be deleted from the form data browser, others by using the API)

If you try to delete a type that is in use by another definition you'll receive a warning, which also tells you which type definitions are using it, but can proceed with the deletion.

Last modified on August 21, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon