Creating Vertec system settings

Creating Vertec system settings: structure and code examples

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 18.02.2013
Updated: 24.09.2024 | List of attribute “gruppe” updated.

Vertec contains a variety of system settings (properties) in which values can be stored.

You can also create an additional system setting. The values saved in this setting can later be accessed in scripts, reports, OCL expressions, etc. (see Properties via OCL). These are suitable for customer-specific management of Vertec.

Structure of the properties

We distinguish between AuswahlProperty (selection) and the other property types: BlobProperty, BooleanProperty, CurrencyProperty, DateTimeProperty, IntegerProperty, ObjectProperty and StringProperty.

The AuswahlProperty is internally an IntegerProperty, but has an additional attribute auswahlliste (selection list). This contains a comma-delimited list of options. A combo box with these options is then shown on the interface. The indices of the options (0-based) are used as values.

All other properties can be configured via the auswahltyp (selection type) and expression attributes.

The different property types have the following attributes:

Attributes

Meaning

propertyname

Internal name of the property, without special characters and spaces. This name is later used to access the property, it does not appear on the interface. Length: 255 characters.

propertycaption

Designation of the property, which is shown in system settings. Normal body text, length: 255 characters.

propertyvalue

The actual value of the property. Is usually queried by the user (via the interface). If you want to set a default value, you can enter a suitable value here (applies to all property types except ObjectProperty ).

auswahltyp

The following selection types are available:

0: None

1: Object

  • Supported for object or string properties
  • An object list dialog appears.
  • The displayed selection list is obtained by applying the property expression to the system.

2: Address

  • Supported for object or string properties.
  • An address search dialog appears.

3: Folder

  • A tree dialog appears to select a Vertec container.
  • In the Expression property, a class name can be specified. Then only containers that can contain this class are listed.

4: File

  • Supported for string properties
  • A file system file selection dialog appears and a file can be selected.
  • Sets the full path of the file as the property value.

5: Path

  • Supported for string properties.
  • A file system file selection dialog appears and a folder can be selected.
  • Sets the full path of the folder as the property value.

6: Extension

  • Supported for all string-compatible properties.
  • Delegates display of dialog to an extension.
  • The expression of the property specifies the name of the extension. It must have a SelectPropertyValue(valuename, defaultvalue) method that returns the selected value as a string.
  • Properties of this type can only be set via code.

7: Image

  • From Vertec 6.5.0.11
  • Supported for blob properties
  • Displays an image field, where an image can be loaded or saved via context menu.

expression

Depends on selection type (see above)

gruppe

Indicates in which section of the system settings the property is shown. The following options exist:

0: General

1: Addresses

2: Project / Case

3: Invoice

4: Accounting

8: Resource Planning

9: CRM / Activities

10: Phone

12: Authentication

13: E-mail

99: Invisible

scope

Indicates whether it is a system-wide or a user-specific property.

0: Global

1: User-specific

If no scope is indicated, it is created as global property by default.

auswahlliste

Selection properties (AuswahlProperty) only. Contains a comma-delimited list of options. A combo box with these options is then shown on the interface.

masked

Only for string properties (StringProperty). Displays the value masked, e.g. for passwords.

Code examples

StringProperty

A string property is a property where an alphanumeric text or path is entered.

Text field

A field in which the value is typed manually:

You can create it as follows:

p = vtcapp.createobject("StringProperty")

p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 0 #None
p.gruppe = 0 #General
Browser file system

Or also via a browser. An explorer appears when clicking on the browse button.

It is created as follows:

p = vtcapp.createobject("StringProperty")

p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 5 #Path
p.gruppe = 0 #General

BooleanProperty

True/False values. Boolean properties are initialized to False by default. You can explicitly set the default by setting the propertyvalue attribute, as in the example below.

It is created as follows:

p = vtcapp.createobject("BooleanProperty")

p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 0 #None
p.gruppe = 0 #General
p.propertyvalue = True

AuswahlProperty

Select an item from a list. You can predefine a selection using the propertyvalue attribute.

It is created as follows:

p = vtcapp.createobject("AuswahlProperty")
p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 0 #None
p.gruppe = 0 #Allgemein
p.auswahlliste = '"Value 1","Value 2","Value 3"'
p.propertyvalue = 1 #Value 2 is preselected

DatetimeProperty

Date value, showing a date picker.

It is created as follows:

p = vtcapp.createobject("DatetimeProperty")

p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 0 #None
p.gruppe = 0 #General

IntegerProperty

Integer value.

It is created as follows:

p = vtcapp.createobject("IntegerProperty")

p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 0 #None
p.gruppe = 0 #Allgemein

MinutesProperty

Used for hourly values. Displays the value on the interface as defined in the system setting Display minutes and has to be entered accordingly. Saved internally as an integer (value in minutes).

It is created as follows:

p = vtcapp.createobject("MinutenProperty")

p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 0 #None
p.gruppe = 0 #Allgemein

CurrencyProperty

Contains a fixed-point number, such as a currency amount.

It is created as follows:

p = vtcapp.createobject("CurrencyProperty")

p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 0 #None
p.gruppe = 0 #Allgemein

ObjectProperty

Selection of an internal Vertec object. Displays a list with Vertec entries according to the OCL expression.

It is created as follows:

p = vtcapp.createobject("ObjectProperty")

p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 1 #Object
p.gruppe = 9 #CRM/Activities
p.expression = "aktivitaetstyp" #OCL Expression
p.objectboldid = 12345

To assign a value in the code, it is not possible to set the propertyValue as with the other properties, because ObjectProperty.propertyValue is derived. The preselection is done here via the member objectBoldID:

p.objectboldid = 12345 #(ID of assigned object)

From Vertec 6.4.0.8, the Python method vtcapp.setpropertyvalue can also be used for ObjectProperties.

BlobProperty

A value that is stored in a blob field in the database. Used for images or for very long reference numbers, for which a normal string field is not sufficient.

It is created as follows:

p = vtcapp.createobject("BlobProperty")

p.propertyname = "name_property"
p.propertycaption = "Designation"
p.auswahltyp = 7 #Image, or
p.auswahltyp = 0 #None, for long text
p.gruppe = 1 #Addresses
Bitte wählen Sie Ihren Standort