Pripravujeme pre Vás novú dokumentáciu, aktuálny stav nájdete tu

OPTIONAL PROPERTIES

In this part of the CMDB it is possible to edit existing properties and create new ones. These can then be used to record any additional data in the forms of various components of the CDESK system, such as:

  • Address Book (Companies, Contacts)
  • Requests (General requests, Catalogue of requests)
  • Deals
  • CMDB (CI types, CI records)

This article describes the recording and creation of optional properties and their components. Working with optional properties and assigning them to individual forms and objects is described in more detail in the article General functions->Optional properties.

Hierarchy of optional properties

  • Properties – also known as optional properties, are a set of one or more base properties. They allow additional data to be recorded in CDESK forms. If a property contains more than one base property, it is a composite property
    • Base properties – determine the type of value that a property records – for example text, number, date, checkbox, data from a database, or a custom enumeration
      • Custom enumerations – a set of user-defined values that are available for selection in a property using a base property of the enumeration type

Base properties

This part defines the base properties and their types. Every clean CDESK installation already contains a set of commonly used base properties, whose detail you can view by selecting an option from the context menu Detail . These predefined properties cannot be edited. If the predefined base properties do not meet your needs, you can add your own using the +Add base property button. A form will open with the following options:

Base type – select the type of data you wish to record in the optional properties:

  • Checkbox (true/false) – a checkbox
  • Counter – a field for entering a numeric value for a selected date
  • Custom Enum – a field for selecting from a predefined set of values from a user-defined enumeration
  • Date – a field for selecting a date
  • Datetime – a field for selecting a date and time
  • DB relation – a field for selecting values stored in a database
  • File upload – a field for attaching a file
  • IP – a field for recording an IP address
  • Long text (65535 chars) – a field for entering long text up to 65535 characters
  • Number (decimal) – a field for entering a number with a decimal point
  • Number (whole number -2mld .. +2mld) – a field for entering a whole number
  • String (255 chars) – a field for entering text up to 256 characters long
  • Time – a field for selecting a time
  • Tri-state checkbox (true/false/maybe) – a toggle that records three possible states
  • Depending on the selected base type, additional form fields become available:
  • Custom enumeration – becomes available after selecting the Custom Enum type – select from the user-defined enumerations. Read more about custom enumerations in a separate section below
  • API path – specify the path to the database from which the values are to be loaded; there are two options:
  • Predefined – choose from the defined paths to the enumerations used in the CDESK database (for example a list of deals, computers, units, countries..)
  • Custom – allows the use of a path to other parts of the CDESK database, according to the API documentation (for example to the list of objects belonging under a CI Main group/CI Type, instead of the ID use the Slug). At the same time it allows values to be loaded from an external database
  • Query parameter – by clicking +Add query parameter you add a row for filling in the parameter and value – you can find the list of parameters in the CDESK API documentation

Name – enter the name of the base property; it will be displayed in the form field as placeholder text (instead of an empty box)

Property type – select the type of data the base property is being created to record. In the API, depending on the selected type, it is possible to look up data that is recorded under a different name (for example by selecting the phone type, you will find all telephone numbers, even if they are recorded in the database once as Telephone contact and another time as Landline)

Slug (alias) – an alias for the ID – allows you to work with base properties in the CDESK API interface without needing to know their ID in the database. Use expressions without diacritics or spaces – instead of spaces use a hyphen. The Slug should be unique, i.e. it may be used at most once within the base properties

To create a base property or apply changes, click Save.

Properties

This part defines the properties used to record additional data in forms. They can be assigned to forms such as companies, contacts, deals, requests, or objects. Every CDESK installation already contains a set of properties, whose detail you can view by selecting an option from the context menu Detail. These predefined properties cannot be edited or deleted. You can also add your own properties using the +Add property button. A form will open with the following options:

Name – enter the name of the property; it will be displayed in the form as the name of the field, or of the set of fields in the case of a composite property

Description – you can provide a brief description of the property (for example the assigned base properties in the case of a composite property)

GroupGeneral/Technical/Other – select which group the property belongs to. It has no effect on the functionality of the property; distinguishing by group helps with the visual sorting of properties in the list of properties

Property type – select the type of data the property is being created to record. In the API, depending on the selected type, it is possible to look up data that is recorded under various names (for example by selecting the phone type, you will find all telephone numbers, even if they are recorded once as Telephone contact and once as Landline)

Slug (alias) – an alias for the ID – allows you to work with properties in the CDESK API interface without needing to know their ID in the database. Use expressions without diacritics or spaces – instead of spaces use a hyphen. The Slug should be unique, i.e. it may be used at most once within the properties

Base properties – clicking Add base property opens a window for selecting base properties sorted by the base property types defined in CMDB->Optional properties->Base properties. Click < to add a base property. By selecting several base properties you can create so-called composite properties (for example the property Address may consist of the base properties Street, Number, Postcode, Country)

To create a property or apply changes, click Save.

Custom enumerations

In this part you define enumerations with custom sets of values. These can then be made available for selection in optional properties using the selected enumeration of values.

You add a new enumeration with the +Add enumeration button.

Name – enter the name of the enumeration; it will be displayed in the form field as placeholder text (instead of an empty box)

Description – you can provide a brief description of the enumeration

With the +Add button you add a new row for entering an enumeration value. By clicking × you remove the row – removal is only possible before saving. After saving the enumeration, unused values can be turned off by switching the toggle to the off state . You can adjust the order of the enumeration values by dragging the icon.

To create a custom enumeration or apply changes, click Save>.

Example of creating a composite property

Let us assume a composite property whose purpose will be to record data about the condition of a device handed over for servicing.

To record information about the condition of the device, we will record whether the device is still under warranty, the date of sale, signs of damage, and the accessories being handed over. We recommend starting from the lowest level, as in the procedure below:

  1. Create a custom enumeration named Damage types with options describing the level of damage:
    • No visible signs of damage
    • Minor scratches
    • Cracks or dents
    • Broken or missing parts
  2. Create the base properties that define the value type
    • Under warranty – only two states will be recorded, so we can use the field type Checkbox (true/false) – a checkbox
    • Date of sale – a field of the Date type – date selection
    • Signs of damage – it will be selected from predefined values – a field of the Custom Enum type – with the Damage types enumeration created in the first step
    • Accessories handed over – the property being created will be usable for devices of various types, each of which may contain different accessories. For versatility, a field of the String (255 chars) type – short text up to 255 characters – will therefore be suitable
  3. Create a property named Device condition
    • Assign the base properties created in the second step

This completes the composite property Device condition, and it can be assigned, for example, to a request. Thanks to its versatility, it is usable for devices of various types. Assigning an optional property to a request form is described in more detail in the article General functions->Optional properties.