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
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.
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
2: Address
3: Folder
4: File
5: Path
6: Extension
7: Image
|
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. |
A string property is a property where an alphanumeric text or path is entered.
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
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
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
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
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
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
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
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
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.
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