ItemProperty

Item property descriptor (defined in item type).

ItemProperty Properties

Id : Integer

Name : String
Property name.

FullName : String
Full property name (for nested properties the form is ‘{Parent.FullName}.{Name}’).

Label : String
Label used by UI.

Type : String
Property value type.

  • Guid
  • String
  • Date
  • Time
  • DateTime
  • Boolean
  • Integer
  • Long
  • Money
  • Decimal
  • Float
  • Email
  • Url
  • Html
  • Document
  • PickList
  • Reference
  • Expression
  • Identity
  • User
  • Identifier
  • Complex
  • CheckboxGroup
  • Grid
  • Override
  • PhoneNumber
  • Object
  • Array
  • Unknown

Description : String

IsReserved : Boolean
Indicates the property is reserved and cannot be deleted (e.g. Id, Name, Status).

IsInternal : Boolean
Indicates the property is internal and is not available remotely (e.g. through API).

IsReadonly : Boolean
Indicates the property is read-only after the first set to a non-null value.

IsNullable : Boolean
Indicates the property may contain null value.

IsUnique : Boolean
Indicates the property value is required to be unique.

IsNested : Boolean
Indicates the property is nested and has Parent reference (e.g. nested property from the complex property).

IsOwn : Boolean
Indicates the property is declared in its ItemType.

IsOverride : Boolean
Indicates that the property overrides the one from the base type.

Sequence : Float
The sequence order of the property.

IsEncrypted : Boolean
Indicates the property value is encrypted by solution secret key.

IsDefaultExpression : Boolean
Indicates that the default value is not stored in DB but is dynamically calculated on demand.

Recalculate : Boolean
Indicates that the property value should be recalculated from its default value on each dependency change.
The property dependencies should be set up for this flag to work correct.

RecalculateOnSelfChanges : Boolean
Indicates that the property value should be recalculated from its default value on any change within the same item.
Works only if Recalculate flag is set.

IsMax : Boolean?
Indicates that the string length of the property value is not limited.

Length : Integer?
The maximum length for textual properties.

MinValue : Float?
The minimum value for numeric properties.

MaxValue : Float?
The maximum value for numeric properties.

Scale : Integer?

Precision : Integer?

Seed : Long?
Initial number for identifier properties.

Increment : Long?
Increment value for every next identifier.

UniqueGlobalScope : Boolean
If false, the unqiue constraint works within parent item (if any).

UniqueBaseScope : Boolean
If true, the unique constraint includes items of base type.

UniqueArchivedScope : Boolean
If true, the unique constraint includes archived items.

IsComplex : Boolean
Indicates that the property is of type Complex (shortcut).

IsVirtual : Boolean
Indicates that the property is not real property but the one virtually existing (e.g. nested one from property type, or expanded one from reference property).

TranslatedLabel : String
Label used by UI, translated to the current user’s language.

TranslatedDescription : String
Description translated to the current user’s language.

ItemType : ItemType
The Item Type the property belongs to, i.e. target type.

FromType : ItemType
The Item Type the property is acquired from (target type, base type or property type).

DeclarationType : ItemType
The Item Type the property is really declared in.

Parent : ItemProperty
Parent property (e.g. complex or reference one), is set only for nested properties.

ReferenceType : ItemType
The Item Type the property refers to (valid for complex and reference properties).

ReferenceIdentity : Identity
Scope Identity to require value to be member of.

ItemProperty Methods

GetDependentProperties(includeSelf = false) : ItemProperty[]

Get properties in the current type that depend on this property (directly or through other properties).

GetDependentProperties Parameters

includeSelf? : Boolean

HasExternalDependencies(includeManual = true, includeState = false, includeConstraint = false, deep = false) : Boolean

Check if there is any external reference (out of current item) in expressions.

HasExternalDependencies Parameters

includeManual : Boolean = true

includeState? : Boolean

includeConstraint? : Boolean

deep? : Boolean

GetDependencies(includeManual = true, includeState = false, includeConstraint = false, deep = false) : ScriptDependency[]

Analyze property expressions and get the list of dependencies.

GetDependencies Parameters

includeManual : Boolean = true

includeState? : Boolean

includeConstraint? : Boolean

deep? : Boolean

IsNestedTo(parent) : Boolean

Check if this property is nested to specified parent property.

IsNestedTo Parameters

parent : ItemProperty

GetBase() : ItemProperty

Get the base property, if this property is overriden in derived type.

Expand(all = false) : ItemProperty[]

Expand reference property and get array of virtual nested properties.

Expand Parameters

all? : Boolean
True to include nested properties from virtual complex properties.

IsParentReference() : Boolean

Check if the property is Parent reference.

IsChildReference() : Boolean

Check if the property is Child reference.

IsPublic() : Boolean

Check if the property is not internal and not reserved (except Name, Child and Status).

HasDefaultValue() : Boolean

Check if the property has default value.

HasDynamicDefaultValue() : Boolean

Check if the property has expression or substitution in its default value.

GetStaticDefaultValue() : String

Get the default value if it is not dynamic, or null otherwise.

HasCheckConstraint() : Boolean

Check if the property has constraint check expression.

HasStateExpression(checkOverrides) : Boolean

Check is the property has state expression.

HasStateExpression Parameters

checkOverrides : Boolean

HasManualDependencies() : Boolean

Check if the property has external dependencies set.

Render(view?, options?, ignoreState = false)

Render the property for the specified view.

Render Parameters

view? : View
If null, then the first available view of type options.ViewType (if set, or Read otherwise) is used.

options? : Dict
Render options used by generator. Can contain ‘$’ dictionary to override rendered dictionary.

ignoreState? : Boolean

CalculateState(view, baseState?) : Dict

Calculate property state for the specified view.

CalculateState Parameters

view : View

baseState? : Dict

CalculateDefaultValue(item)

Calculate default value for the specified item (does not work for expression properties).

CalculateDefaultValue Parameters

item : Item

HasDependentProperties(includeSelf = false, includeContainerTypes = false) : Boolean

Check if there is any property in the current type that depends on this property.

HasDependentProperties Parameters

includeSelf? : Boolean

includeContainerTypes? : Boolean

ItemType

The hierarchy of Item Types define business model of a solution.

ItemType Properties

Id : Integer

Name : String
Entity name.

Solution : Solution
Target solution the entity belongs to.

FullName : String
Full name in the form ‘{SolutionName}.{ItemTypeName}’.

Label : String
Label used by UI.

CollectionName : String
Collection name is used as collection navigation property name from parent item.

Plural : String
Plural label used by UI.

Description : String

IsAbstract : Boolean
Indicates the type is abstract and cannot have items.

IsPolymorphic : Boolean
References to the polymorphic type can use items of derived types.

IsPropertyType : Boolean
Indicates that this type is used only as a type of complex properties. That means no any instance of this type can be created outside of the scope of a type that owns a property of this complex type.

IsPickListType : Boolean
Indicates that this type is derived from Gnosis.LOV.

Relationship : String
Link types have Parent and Child reference properties, Relationship types have Parent reference property.

  • None
  • Relationship
  • Link

IsRelationshipType : Boolean
Relationship types have Parent reference property.

IsLinkType : Boolean
Link types have Parent and Child reference properties.

IsTrackingChanges : Boolean
Indicates that all items changes of this type are tracked and stored in the history of changes.

SkipAffected : Boolean
Indicates that items of this type are excluded from affected list in API and remote events.

CaseInsensitive : Boolean
Perform case insensitive search when filtering items.

FontIcon : String
Icon class used by UI. If not set then returns inherited one.

PublicProperties : Dict
Dictionary of not-internal, not-nested properties (excluding some reserved properties like Id).

IncludeDerived : Boolean
Auto include derived in Items property.

TranslatedLabel : String
Label used by UI, translated to the current user’s language.

TranslatedPlural : String
Plural label used by UI, translated to the current user’s language.

TranslatedDescription : String
Description translated to the current user’s language.

BaseType : ItemType
Base type of this item type, or null if this type is not derived.

DerivedTypes : ItemType[]
Array of item types that derive from this item type.

Properties : ItemProperty[]
All real but not nested properties (including inherited, excluding special properties of type Override), ordered by sequence.

ParentType : ItemType
Parent item type of the relationship/link type, or null.

ChildType : ItemType
Child item type of the link type, or null.

Collections : Dict
Dictionary (collectionName -> ItemType) of types that have Parent reference to this item type.

Lifecycle : Lifecycle

Items : ItemList
Query items (use Filter, Sort, etc.).

ItemType Methods

CanCreateRemote() : Boolean

Check if there is a permission to create items remotely (i.e. through API).

IsSimplePickList() : Boolean

Check if the type is derived from Gnosis.LOV and is not a relationship or link.

IsSolutionType() : Boolean

Check if the type is special ItemType that represents solution and has no name.

HasSummaryExpression() : Boolean

Check if Summary property has custom expression.

GetRootBaseType() : ItemType

Get the topmost base type, or the type itself if it is not derived.

IsBasedOn(baseType, treatSelfAsBase = false) : Boolean

Check if this item type is based on specified type (directly or indirectly).

IsBasedOn Parameters

baseType : ItemType

treatSelfAsBase? : Boolean

MatchesReferenceType(refType, allowPropertyTypes = false) : Boolean

Check if a particular item of this item type can be assigned to a reference property of the item type ‘refType’.
True if refType equals to this item type or is one of the polymorphic base types of this type.

MatchesReferenceType Parameters

refType : ItemType

allowPropertyTypes? : Boolean

GetAllDescendants(self = false, onlyPolymorphic = false) : ItemType[]

Get array of all direct and indirect derived types.

GetAllDescendants Parameters

self? : Boolean

onlyPolymorphic? : Boolean

IsRootType() : Boolean

Check if this item type is treated as a root type (has no base type or has external base type, not a relationship, not a link, not a property type).

GetOwnProperties() : ItemProperty[]

All own properties including nested, excluding special properties of type Override.

GetAllProperties() : ItemProperty[]

All real properties (including inherited and nested, excluding special properties of type Override).

GetDerivedProperties(nested = false, onlyPolymorphic = false, includeTypeNameProperty = false) : ItemProperty[]

Get all real properties from all derived item types.

GetDerivedProperties Parameters

nested? : Boolean

onlyPolymorphic? : Boolean

includeTypeNameProperty? : Boolean

IsUsedAsParent() : Boolean

Check if this item type is used as a parent reference by any relationship or link type.
Note that derived types also inherit child relationships of their base types.

IsUsedAsChild() : Boolean

Check if this item type is used as a child reference by any link type.

GetTypesUsingMeAsParent(includeIheritedRelationships = true) : ItemType[]

Get all item types that have Parent reference to this item type.
Note that derived types also inherit child relationships of their base types.

GetTypesUsingMeAsParent Parameters

includeIheritedRelationships : Boolean = true

GetTypesUsingMeAsChild(includePolymorphicBases = true) : ItemType[]

Get all link types that have Child reference to this item type.

GetTypesUsingMeAsChild Parameters

includePolymorphicBases : Boolean = true

GetTypesUsingMeAsPickList(includePolymorphicBases = true) : ItemType[]

Get all types that have PickList reference to this item type (or to its polimorphic base types).

GetTypesUsingMeAsPickList Parameters

includePolymorphicBases : Boolean = true

GetAllReferringTypes() : ItemType[]

Get all types that have a reference to this item type.

GetAllReferringProperties(parent = true, child = true, picklist = true, includePropertyTypes = true) : ItemProperty[]

Get all properties from all item types that refer to this item type.

GetAllReferringProperties Parameters

parent : Boolean = true

child : Boolean = true

picklist : Boolean = true

includePropertyTypes : Boolean = true

Transitions(fromState) : LifecycleNextState[]

Get array of next states (transitions) from the specified state.

Transitions Parameters

fromState : String

View(name, forState?, isAction = false, required = true) : View

Returns a view of this item type by name.

View Parameters

name : String

forState? : String
Target state name, or null for stateless.

isAction? : Boolean?
True to find action view, false to find non-action view, null to find all.

required : Boolean = true
False to return null if a view was not found.

ActionView(name, required = true) : View

Returns an action view of this item type by name.

ActionView Parameters

name : String

required : Boolean = true
False to return null if a view was not found.

Views(viewType, forState?, isAction = false) : View[]

Returns accessible views of this item type by view type.

Views Parameters

viewType : String?
Null to get all view types.

  • Items
  • New
  • Update
  • Read
  • Custom
  • Override
  • Report
  • Print
  • Import
  • Template
  • Layout
  • EventHandler
  • Task
  • Generator

forState? : String
Target state name, or null for stateless.

isAction? : Boolean?
True to get action views, false to get non-action views, null to get all.

GetAllViews() : View[]

Returns all views of this item type.

CanSetPermissions() : Boolean

Check if there is a permission to set items permissions.

IsAccessibleFor(identity) : Boolean

Check if the entity is accessible for the specified identity.

IsAccessibleFor Parameters

identity
Identity object, or team name, or user email.

IsAccessibleFor Examples

$Solutions.SomeSolution.IsAccessibleFor('Everyone');

IsAccessible() : Boolean

Check if the entity is accessible for the current user.

Leave a Comment

Your email address will not be published. Required fields are marked *