Skip to content

Standard Properties

Broderick Hyman edited this page Oct 24, 2023 · 2 revisions

Core Properties

If you find yourself creating records in directly in the Aras database, here is a useful guide to setting the standard Aras fields:

  • classification (nvarchar(512), null): the class path for the record as defined in the item type
  • created_on (datetime, not null): the UTC date on which the record was created. The current system time in UTC can be retrieved with the function getutcdate()
  • created_by_id (char(32), not null): the id of the user that created the record
  • css (nvarchar(max), null): CSS used for styling items in a web client (e.g. to make certain rows of the grid red). By default, leave this null
  • current_state (char(32), null): the id of the life cycle state that the record is currently in. If no life cycle is defined, leave this null.
  • id (char(32), not null): the primary key of the table specified as a 32-character GUID.
    Such GUIDs can be generated in SQL Server using a statement similar to replace(newid(), '-', '')
  • is_released (char(1), null): whether the item is in a "released" life cycle state. This should match the set_is_released property of the Life Cycle State referenced by the current_state property. For items without a current_state, set this to 0.
  • keyed_name (nvarchar(128), null, don't leave null): the human-readable name of the record. For items without a keyed name order defined in the item type, this will be the same as the id.
  • locked_by_id (char(32), null): the id of the user that has the record locked. null if no user has the record locked
  • managed_by_id (char(32), null): the id of the identity that "manages" the record
  • modified_by_id (char(32), null, don't leave null): the id of the user that last modified the record. For records that have not been modified since creation, the modified_by_id matches the created_by_id.
  • modified_on (datetime, null, don't leave null): the UTC date on which the record was last modified. The current system time in UTC can be retrieved with the function getutcdate(). For records that have not been modified since creation, the modified_on matches the created_on.
  • not_lockable (char(1), null): whether the item is in a "not lockable" life cycle state.
    This should match the set_not_lockable property of the Life Cycle State referenced by the current_state property. For items without a current_state, set this to 0.
  • owned_by_id (char(32), null): the id of the identity that "owns" the record
  • permission_id (char(32), not null): id of the permission object used to define the access for the item. For most items associated with a life cycle, this generally matches the state_permission_id property of the Life Cycle State referenced by the current_state property (if defined). Otherwise, it defaults to the state_permission_id for the most recent state where the property is not null or the permission marked as default for the item type.
  • state (nvarchar(32), null): the name of the state referenced by the current_state property
  • team_id (char(32), null): id of the team used for permissions of this item.

Versioning Properties

While the following fields are defined on all item types (except for aras:uniqueness_helper), they only are truly relevant in the context of a versionable item type. Read the descriptions for guidance on how to set these fields for non-versionable item types

  • aras:uniqueness_helper (char(32), null): for is_current = 0 versionable items, this is set to match the id property. For is_current = 1 items, this is null. Its purpose is to permit the creation of uniqueness constraints in the database for versionable items (where records with the same config_id should be allowed to have the same value, but records with different config_id values should not be allowed to have the same value for a given field).
  • config_id (char(32), not null): for non-versionable items, this should be the same as the id property.
  • generation (int, null, don't leave null): For versionable items, this is an ever-increasing number that starts at 1 and indicates the sequence of revisions/generations. The generation with the greatest number is always marked as is_current = 1. For non-versionable items, set this value to 1.
  • is_current (char(1), null, don't leave null): 1 indicates that this record is the most recent generation for the given config_id sequence, 0 otherwise. When in doubt, or for non-versionable item types, set this field to 1.
  • major_rev (nvarchar(8), null): the revision letter of the generation. It is common to set this field to A even for non-versionable item types
  • minor_rev (nvarchar(8), null): currently not used by Aras. It is reserved for future use so that items can have a A.1 style revision where there is a minor in addition to a major revision
  • new_version (char(1), null, don't leave null): When an automatically-versioning item is first saved, this value is set to 1 to tell Aras not to create additional versions on subsequent saves until the item is unlocked. For manual-versioning items this always has a value of 1. For all non-versionable items or records not in the middle of this process, set this field to 0.

The following properties are added to versioned item types:

  • effective_date (datetime, null): The UTC date representing the first time this revision can be used.
  • release_date (datetime, null): The UTC date when this revision was released
  • superseded_date (datetime, null): The UTC date when this revision was superseded by a more current released revision

Relationship Fields

The following fields are only present in relationships.

  • behavior (nvarchar(64), null): specifies whether or not the related_id property should always point to the latest generation of the related item ("floating") or whether it should only point to the generation referred to by the ID that was originally used ("fixed"). Innovator sets these values based first on the item_behavior property of the most life cycle state the item has been set to for which the item_behavior was defined (unless the item had previously been set to a "hard float" or a "hard fixed" state). If values are not set on the life cycle states, then the default specified in the relationship type is used.
  • related_id (char(32), null): the id of the item that this record relates to. The type of this item is defined in the relationship type.
  • sort_order (int, null): This field will be defaulted to the next multiple of 128. It can be used to sort the relationship if so defined in the item type definition for the relationship.
  • source_id (char(32), null, don't leave null): the id of the item that this record is sourced from to. The type of this item is defined in the relationship type. AML prevents this value from being null.
Clone this wiki locally