[TRANSFORM] - Transforming Values Before Export
This guide explains how to use the TRANSFORM
function in eAdm to standardize job titles from a source system (like an HRM) before they are exported to a destination system (like Active Directory). This is useful when the source job titles are too long, inconsistent, or detailed for the intended purpose in the destination system.
For example, you can consolidate multiple variations of a manager title into a single, standardized title.
When to Use Title Transformation
You should use this function when job titles in your Human Resource Management (HRM) system are inconsistent or overly specific. For example, the titles "Dept. Manager/Team Lead," "Manager, Sales," and "Head of Sales Department" can all be standardized to the simpler title "Manager" in the user's Active Directory profile.
eAdm provides a function to transform this data automatically during the export process. The end result should look somthing like this:
Source Title from HRM | Destination Title in AD |
---|---|
Adjunkt (med tilleggsutdanning) | Adjunkt |
Avd.leder/Undervisningsinsp./Fagleder | Avdelingsleder |
Avdelingsleder grunnskole | Avdelingsleder |
In this scenario, various source titles are mapped to the standardized title "Avdelingsleder" before being written to the Title
attribute in Active Directory.
Note: Titles that are not included in your transformation list will be exported without any changes. You only need to define the titles you wish to modify.
Syntax
The syntax is:
[TRANSFORM;SourceAttribute;SourceValue1|DestinationValue1;SourceValue2|DestinationValue2]
[TRANSFORM;... ]
: The function keyword that initiates the transformation.SourceAttribute
: The name of the attribute you want to read from (e.g.,title
).SourceValue|DestinationValue
: A pair defining the original value and the new value it should be transformed into.
Example:
[TRANSFORM;title;Avd.leder/Undervisningsinsp./Fagleder|Avdelingsleder;Avdelingsleder grunnskole|Avdelingsleder]
How to Edit Transformations
You can manage the list of title transformations in two ways: directly in the eAdm user interface or by bulk editing in a text editor.
Method 1: Using the eAdm Interface
This method is suitable for adding or changing a few titles at a time.
Navigate to the relevant Export Template in eAdm.
Click Edit to open the template configuration.
Locate the field where the transformation is applied (e.g.,
description
) and click the table icon to open the editor.In the pop-up window, click the + icon to add a new row.
Enter the source title in the left column and the desired destination title in the right column.
Repeat for all new titles.
Click Save in the editor, and then remember to save the export template to apply the changes.
Method 2: Bulk Editing with a Text Editor
This method is efficient for creating or maintaining long lists of transformations. We recommend using an application like Notepad++.
Step 1. Prepare the List for Editing
Copy the entire
TRANSFORM
string from the eAdm export template.In Notepad++, paste the string into a new file.
Open the "Find and Replace" dialog (Ctrl+H).
In the "Find what" field, enter
;
.In the "Replace with" field, enter
\n
(which represents a newline character).Select the "Extended" search mode.
Click "Replace All". This will place each transformation pair on its own line, making it easy to read and edit.
Step 2. Edit the List
Add, edit, or remove lines as needed. Ensure each line follows the SourceValue|DestinationValue
format.
Step 3. Prepare the List for eAdm:
When you are finished editing, reverse the process.
In the "Find what" field, enter
\n
.In the "Replace with" field, enter
;
.Click "Replace All". This will convert the list back into a single, semicolon-separated string.
Copy the resulting string and paste it back into the appropriate field in your eAdm export template.
Verification
Warning: Incorrect syntax will cause errors during the export process. Always test your changes before finalizing them.
After saving the changes to the export template, click the Play icon next to the mapping you modified.
Click Preview to see how the data will be transformed.
Review the "New Value" (
Ny verdi
) column to confirm that the titles are being changed correctly. If the preview does not show the expected results, check your syntax for errors.