TRANSFORMER

Object target

Use an object target when you want to insert and update objects in the BMP system. You can specify what type of objects to create and where to create them, and then you can map columns in the source to object properties. When the project is run, the object target will create and update objects with properties that correspond to the columns of each row in the source.

 

It is also possible to use an object target to create linked objects, by selecting an object to copy from Templates.
 The Object target makes User target and Group target obsolete, and from version 4.0.3.0 onwards they have been removed and merged into this target.

Creating an object target

To create an object target, right click in the Transformer design panel, choose Target -> Object target. Connect it to the previous process as described in Processes. Double click the object to configure it.

Properties

General

Configuration

 

Object or a Model and Type, click the Add mapping button to start mapping columns in the source to object properties:

To update a property that is a checkbox, use the values "0" and "1" for unchecked and checked respectively. It is not possible to give a checkbox "No value" via an Object target.

To update a property that is a list, give each alternative in the list a value, starting with "0". E.g. to update Visibility, the alternatives would have the values:

  • Visible = 0

  • Not visible = 1

  • Only visible for Admin = 2

 

From version 4.4.0.0 onwards, mapping formatting by using a string that contains all the formatting properties (e.g.  ;;2;percentage;positive) should not be used. Nodes or objects will be created, but formatting will not be correctly configured, and mapping Format types 'Date' and 'Duration' in this way does not work.

Each formatting property should now be defined individually in order to be mapped, e.g. in individual columns in an Excel source,.

 

Audit

 

 Logic rules for property mapping:

1. Special property: parent - parent must be mapped for objects that require an existing parent object. If parent is not included or if the indicated parent is not a valid parent a warning will be given.

2. Special property: ID - the ID property mapping will be used when creating objects, but if the ID already exists the object will be updated instead. If the object with the specified ID is of a different type than the one selected in Type, the row will be dropped out and a message will be added to the log file.

3. Reference properties will map to a column using business ID.

4. Multi Reference properties will map to a column containing a comma-separated list of business IDs.

Properties that are invalid will report a warning to the Transformer.

 

  Some objects do not require a "parent" object, such as nodes, users, groups, and organizations. Since an ID will be assigned automatically if there is none, and all other properties are also optional and need not be mapped, it is in fact possible to create such an object without defining any mapping in the Object target.

 

Example of importing a List Property set and items from an Excel source

Here is an example of how you can use an object Target to create List property sets and List property items in Shared web items:

  1. In Shared web items, create a category to hold the List property set.
  2. Create a Transformer project “Import List Property Set”
    Source: Excel file
    Your Excel file must contain at least the following information:

Process: Calculation: “Parent” = the ID of your category in Shared web items

 

Target: Object target configured like this: (In this example, we use List Property set name as ID, but you may have a separate column containing the ID)

 

  1. Run the project.
  2. Create a Transformer project “Import List Property Items”
    Source: Excel file
    Your Excel file must contain at least the following information:

Process (optional): If your source does not contain a column with TRUE and FALSE values, you can create a new column with these values, based on other values in the source. Add a Calculation process and add a new Result field. In our example, all rows where Number is less than 4 should be given the value TRUE. In the Function field enter e.g. ${Number} < 4.0.

 

Target: Object target configured like this: (In this example, we use the same column as ID and Name)

  1. Run the project.

 

Version 5.1.2.0

This document contains confidential information. Not to be copied by third parties without written authorization.

© Copyright Corporater AS - All rights reserved.