AttributesThe 'Attributes' tab determines how attribute values of the target objects will be arrived at. In the simplest form, the values can be copied directly from source object's plain attributes. They can also be specified as relation attributes or they can be calculated. Attribute Creation To create an attribute, use the 'Create' button in the 'Atributes' tab of the 'Object mapping' editor. This calls the 'New: Object mapping attribute' There are two ways to create a new attribute assignment: Specify attributes directly in the 'Source attribute' and 'Target attribute' fields Typing the first letter(s) of the attribute name and pressing the 'Enter' key will open a catalog listing all available attributes of the object type. Use it to select the desired attibute. Use the 'Source attribute' and 'Target attribute' buttons Pressing the 'Source attribute' or 'Target attribute' button prompts you to select the type of attribute: Attribute - plain attribute of the source / target object Relation - relation attribute Upon selection and pressing 'Ok', a catalog of attributes of the selected type is displayed. If a chain of relations specifies the path to the attribute, just go through the 'Select source attribute dialog / selection catalog' cycle until the final plain attribute is selected. Calculated Attributes Calculations can be used to specify the attributes. It is possible to use build in variables src and trg, which serve as substitutes for source and target objects. Example: Target attribute 'datBeg' is a date, will be populated with information taken over from the 'periode' attribute of the source 'LEISTDAT' object. For the information to be useful, it has to undergo the following transformation:
This leaves us with date value of "first of a particular month and year" Variables src and trg are implemented as python objects and you can access attributes by passing their name as parameters. E.g.: strip(src(“kst”)) means that attribute kst has to be taken from the source object and leading and trailing spaces will be erased. In this case a simpler form strip(kst) could be used. Additionally, 'nvl' function can be used to eliminate null value presence. See 'Python expressions' for more information. | |||||