Property values entered are validated against their type. Optional validation expressions need to be specified in JavaScript where the property value is referred as _this.value
. The expressions need to be evaluated to a boolean value (true|false
). Examples:
Only uppercase values are valid for strings: _this.value == _this.value.toUpperCase()
Only numbers larger than 10 are valid: _this.value > 10
Date value needs to be after 2016-12-04 12:45:30: _this.value.isAfter(java.time.LocalDateTime.parse(\"2016-12-04T12:45:30\")
Valid email string: /\S+@\S+/.test("_this.value")
In case the validation fails for the value entered in the Local Code Editor, the defined validation message is presented to the user. The value entered can be referenced using the %s
specifier. For example, typing the value MyString
for a string type Local Code property where the property definition's validation expression and message are
_this.value == _this.value.toUpperCase()
Only upper case letters are allowed. '%s' has lowercase letters
,
will result in the message Only upper case letters are allowed. 'MyString' has lowercase letters.
Schema changes will not automatically update concepts.
Existing property definitions can be modified using the Local Code System editor. This is also where new properties can be added using thebutton, and existing ones can be removed using thebutton. To persist the changes, press save.
To keep concepts in sync, save the editor and then press the dedicatedUpdate Concept Properties button in the Additional Properties section toolbar. Newly added properties will also be available on the concepts, while deleted properties will be removed from the concepts.
User-defined properties in the Local Code editor are presented in the order of the corresponding property definitions configured on the Local Code System editor. The order of the definitions can be rearranged using the arrow buttons located on the property definition section headers. The detailed definition of a property can be collapsed and expanded individually or by pressing thebutton in the section toolbar.