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
- 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/array length of the property value is not limited.
Length : Integer?
The maximum length for textual/array 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/owner 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.
SkipHistory : Boolean
If true, the property value is excluded from history log.
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).
IsString : Boolean
Indicates that the property is of type String, Email, PhoneNumber, Url or Html.
IsNumber : Boolean
Indicates that the property is of type Integer, Long, Float, Decimal or Money.
IsDateTime : Boolean
Indicates that the property is of type Date, Time or DateTime.
IsIdentityReference : Boolean
Indicates that the property is of type Identity or User.
IsReference : Boolean
Indicates that the property is of type Reference or PickList.
IsDocument : Boolean
Indicates that the property is of type Document.
IsExpression : Boolean
Indicates that the property is of type Expression.
IsComplex : Boolean
Indicates that the property is of type Complex.
IsObject : Boolean
Indicates that the property is of type Object.
IsArray : Boolean
Indicates that the property is of type Array.
IsTypedArray : Boolean
Indicates that the property is of type Array and has strict item type.
IsArrayItem : Boolean
Indicates that the property is inside array.
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, array or reference one), is set only for nested properties.
ReferenceType : ItemType
The Item Type the property refers to (valid for complex, array and reference properties).
ReferenceIdentity : Identity
Scope Identity to require value to be member of.
ItemProperty Methods
Render(view?, options?, ignoreState = false)
Renders 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
Calculates property state for the specified view.
CalculateState Parameters
view : View
baseState? : Dict
CalculateDefaultValue(item)
Calculates default value for the specified item (does not work for expression properties).
CalculateDefaultValue Parameters
item : Item
HasDependentProperties(includeSelf = false, includeContainerTypes = false) : Boolean
Returns true if there is any property in the current type that depends on this property.
HasDependentProperties Parameters
includeSelf? : Boolean
includeContainerTypes? : Boolean
GetDependentProperties(includeSelf = false) : ItemProperty[]
Returns 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
Returns true 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[]
Analyzes property expressions and returns the list of dependencies.
GetDependencies Parameters
includeManual : Boolean = true
includeState? : Boolean
includeConstraint? : Boolean
deep? : Boolean
GetParentArray() : ItemProperty
Finds closest parent property of type Array.
IsNestedTo(parent) : Boolean
Returns true if this property is nested to specified parent property.
IsNestedTo Parameters
parent : ItemProperty
GetBase() : ItemProperty
Returns base property if this property is overriden in derived type, or null otherwise.
Expand(all = false) : ItemProperty[]
Expands reference property and returns array of virtual nested properties.
Expand Parameters
all? : Boolean
True to include nested properties from virtual complex properties.
IsParentReference() : Boolean
Returns true if the property is Parent reference.
IsChildReference() : Boolean
Returns true if the property is Child reference.
IsPublic() : Boolean
Returns true if the property is not internal and not reserved (except Name, Child and Status).
HasDefaultValue() : Boolean
Returns true if the property has default value.
HasDynamicDefaultValue() : Boolean
Returns true if the property has expression or substitution in its default value.
GetStaticDefaultValue() : String
Returns the default value if it is not dynamic, or null otherwise.
HasCheckConstraint() : Boolean
Returns true if the property has constraint check expression.
HasStateExpression(checkOverrides) : Boolean
Returns true if the property has state expression.
HasStateExpression Parameters
checkOverrides : Boolean
HasManualDependencies() : Boolean
Returns true if the property has external dependencies set.
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
Indicates that case insensitive search is used 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).
NoStoreSummary : Boolean
IncludeDerived : Boolean
Indicates that derived items are automatically included 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
CanSetPermissions() : Boolean
Returns true if there is a permission to set items permissions.
CanCreateItems() : Boolean
Returns true if there is a permission to create items.
CanCreateRemote() : Boolean
Returns true if there is a permission to create items remotely (i.e. through API).
IsSimplePickList() : Boolean
Returns true if the type is derived from Gnosis.LOV and is not a relationship or link.
IsSolutionType() : Boolean
Returns true if the type is special ItemType that represents solution and has no name.
HasSummaryExpression() : Boolean
Returns true if Summary property has custom expression.
GetRootBaseType() : ItemType
Returns the topmost base type, or the type itself if it is not derived.
IsBasedOn(baseType, treatSelfAsBase = false) : Boolean
Returns true if this item type is based on specified type (directly or indirectly).
IsBasedOn Parameters
baseType : ItemType
treatSelfAsBase? : Boolean
MatchesReferenceType(refType, allowPropertyTypes = false) : Boolean
Returns true 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[]
Returns array of all direct and indirect derived types.
GetAllDescendants Parameters
self? : Boolean
onlyPolymorphic? : Boolean
IsRootType() : Boolean
Returns true 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[]
Returns all real properties from all derived item types.
GetDerivedProperties Parameters
nested? : Boolean
onlyPolymorphic? : Boolean
includeTypeNameProperty? : Boolean
IsUsedAsParent() : Boolean
Returns true 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
Returns true if this item type is used as a child reference by any link type.
GetTypesUsingMeAsParent(includeIheritedRelationships = true) : ItemType[]
Returns 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[]
Returns all link types that have Child reference to this item type.
GetTypesUsingMeAsChild Parameters
includePolymorphicBases : Boolean = true
GetTypesUsingMeAsPickList(includePolymorphicBases = true) : ItemType[]
Returns all types that have PickList reference to this item type (or to its polimorphic base types).
GetTypesUsingMeAsPickList Parameters
includePolymorphicBases : Boolean = true
GetAllReferringTypes() : ItemType[]
Returns all types that have a reference to this item type.
GetAllReferringProperties(parent = true, child = true, picklist = true, includePropertyTypes = true) : ItemProperty[]
Returns 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[]
Returns 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, null for stateless, or ‘*’ to ignore permissions.
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, internal?) : 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
- Import
- Template
- Layout
- EventHandler
- Task
- Generator
forState? : String
Target state name, null for stateless, or ‘*’ to ignore permissions.
isAction? : Boolean?
True to get action views, false to get non-action views, null to get all.
internal? : Boolean?
True to get internal views, false to get non-internal views, null to get all.
GetAllViews(viewType?, isAction?, internal?) : View[]
Returns all views of this item type (regardless of permissions).
GetAllViews Parameters
viewType? : String?
Filter by view type (null to get all view types).
- Items
- New
- Update
- Read
- Custom
- Override
- Report
- Import
- Template
- Layout
- EventHandler
- Task
- Generator
isAction? : Boolean?
True to get action views, false to get non-action views, null to get all.
internal? : Boolean?
True to get internal views, false to get non-internal views, null to get all.
IsAccessibleFor(identity) : Boolean
Returns true 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
Returns true if the entity is accessible for the current user.