# Defining Property Transforms

This may be a CMDB field for a Federated CMDB resource field mapping, or a Call or Request field for an Event Management field mapping, depending on the area of integration in which you are mapping fields. These macros are stored in the database and mapped against resource property to CMDB field mappings. The data is transformed when it is stored or compared against CMDB fields. However, when viewing resources through the resource viewer (on the External Resource Search screen, Linked Resources CMDB screen or the Federated CMDB Admin screen), the resource property values are displayed in their original data type.

## Define a Property Transform

A property transform can be defined for the following field types: String, text, float, decimal, integer, date-time, and Boolean number.

You can specify code to:

* convert units: for example bytes to kilobytes or megabytes
* round off decimals: for example 1.66666 GHz to 1.7 GHz
* summarize data: for example, interpreting “Microsoft Windows 10” as just “Windows”.

{% hint style="info" %}

### Before you start

You must have **Integration Setup** selected in the Admin tab of your **General Access Security Role**.
{% endhint %}

1. Select ≡ > **Admin** > **Integration**.
2. In the Explorer pane, under **Integration**, select **Resources**.
3. Select a source in the drop-down list to populate the resource type list.
4. Double-click a resource type.
5. In the mapping window, select a mapping and then select **Transform**. The **Transform** window lists all existing property transforms. You can add new transforms, and delete or modify existing ones.
6. Select the **Details** tab and add the name and, optionally, a description of the property transform.
7. Select the **Implementation** tab and define the arguments and the code that will be used to transform the field data.
   * To add an external field as an argument, click **Add** in the **Arguments** section. In the **Add Argument** window, select the field and click **OK**. To edit the name of an argument, double-click the argument or select it and click **Edit**.
   * To change the data type that identifies how the data from the source should be interpreted, double-click the argument. At **Data Type**, select another data type, such as: String, Integer, Float, Boolean, or Date/Time.

{% hint style="info" %}
You cannot edit the arguments once the property transform is saved.

The code should use VB.NET syntax, but should not contain any Function, Class, Sub, Structure, Property, and Imports or public/private/protected member declarations. It should be assumed that the code is the body of a static function with a single parameter called InputValue of the type defined by Data Type and must include a Return statement that returns a value that is the transformed value to be stored against the CMDB Item
{% endhint %}

* At **Return Type**, select the data type to be returned by the transform.
* In the **Code** area, type the code that will perform the property transform.
* To see whether your code works correctly, click **Test**. A dialog box displays prompting you to specify an input value. Type the input value. The system will convert the value and display a message that the test has been successful. If the code is incorrect, the system will display a message that the transform failed.
* To enable the transform to be used for other internal or external fields, select the Binding tab. For the relevant argument, click in the **Value** column and click  to select a field or specify a value.
* Click OK to save your changes. ASM Core will compile the code and display a dialog box if the compilation fails, and will not close the Transform window.&#x20;
* Click **Cancel** to close the window without saving your changes.

### Updating a Transform

1. Select ≡ > **Admin** > **Integration**.
2. In the Explorer pane, under **Integration**, select **Resources**.
3. Select a source in the drop-down list to populate the resource type list.
4. Double-click a resource type.
5. In the mapping window, select a mapping and then select **Transform**. The **Transform** window lists all existing property transforms.
6. Select  and select the transform you want to edit.
7. Click **Edit** and make the necessary changes.

### Deleting a Transform

1. Select ≡ > **Admin** > **Integration**.
2. In the Explorer pane, under **Integration**, select **Resources**.
3. Select a source in the drop-down list to populate the resource type list.
4. Double-click a resource type.
5. In the mapping window, select a mapping and then select **Transform**. The **Transform** window lists all existing property transforms.
6. Select the transform you want to delete.
7. Click **Delete**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.alemba.com/asm-hermes/integrate/managing-integration/setting-up-the-integration-platform/defining-property-transforms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
