How to obtain attributes information

Unofficial Content

To get Attribute information from a transaction you can:

  • use the Attributes properties from the Transaction Root Structure to get the first level attributes and then use the GetLevels and iterate using a TransactionLevel reference (Attributes property).
  • use the GetAttributes method from the Transaction Structure to get a reference on all attributes used in the Transaction Structure. 


Transaction TRN = ...
foreach (TransactionAttribute att in TRN.Structure.Root.Attributes) {
	att.IsKey // bool
	att.IsForeignKey // bool
	att.IsDescriptionAttribute // bool
	att.IsInferred // bool
	att.IsRedundant // bool
	att.IsNullable // bool
	att.Attribute.Description // string
	att.Attribute.ColumnTitle // string
	att.Attribute.Type // eDBType
	att.Attribute.Length // int
	att.Attribute.Decimals // int
	att.Attribute.Default // IApplyDefaultTarget
	att.Attribute.DomainBasedOn // Domain
	att.Attribute.Formula // Formula
	att.Attribute.GetPropertyValue("AUTONUMBER") // object, para esta propiedad tendrias que hacer el cust a bool
	att.Attribute.Class // AttributeClass: (HORIZONTAL, INFERRED, PRIMARY, SECONDARY, VERTICAL)
	att.Attribute.SuperType // Attribute