Skip to main content
Version: 2024.1

Add or Update Attributes

Description: Add a new attribute to the data model, or modify an existing attribute.

Signature: add_or_update_attribute(attribute_name, default_value, description, attribute_type, lookup_values, rules)

Parameters:

NameDirectionRequiredDescription
attribute_nameInYesThe name of the attribute that you want to add or modify
default_valueInNoThe default value that you want to assign to the attribute in case it is left empty when used
descriptionInNoA short description for the attribute
attribute_typeInYesOne of the following values: DateTime, Numeric, String, Boolean, Lookup, Password
lookup_valuesInNoIf the attribute type is Lookup, specify the list of allowed values
rulesInNoSpecify 0 or more capabilities for the attribute, available values:
  • Editable After Run (System Administrators)
  • Editable After Run (Everyone)
  • Configuration
  • Setting
  • Display In Diagram
  • Link Configurations
  • Variable Capability
  • Constant Capability
  • Displayed In Route Creation
  • Available For Abstract Resources
  • Displayed In Search Filters
  • Execution Server Selector
  • Monitor Modifications
  • Admin Only
  • Sample:

    `packageEditor.add_or_update_attribute('AttString','','String Attribute','String','','')`

    `packageEditor.add_or_update_attribute('AttLookup','A','Lookup Attribute','Lookup',['A','B','C'],'')`

    `packageEditor.add_or_update_attribute('AttString','AAA','String Attribute1','String','',['Editable After Run (System Administrators)','Editable After Run (Everyone)','Configuration','Setting','Displayed In Diagram','Link Configurations','Variable Capability','Constant Capability','Displayed In Route Creation','Available For Abstract Resources','Displayed In Search Filters','Execution Server Selector','Monitor Modifications','Admin Only','Editable After Run'])`