How to use Value setter

Table Of Contents

  • General description
  • The different parts of the Value Setter
  • Guide
  • Video guide

General description

The Value Setter is a tool that helps add additional data to the context. By using placeholders, it can be used to take data from the original context and copy it to different keys. The copied data can be manipulated in the process.

A practical example is when system A provides a customer’s name in two separate fields named first_name and last_name, while the target system (system B) only has a single name field. In this case, the Value Setter can then be used to merge the first and last name fields from system A to make it compatible with system B.

The different parts of the Value Setter

Key (required field)

This field helps the Value Setter define where the data needs to be added. The key is a path separated by dots, where path.to.target becomes a nested element in the context data represented as:

-path
-to
– target = value

Value

This specifies the value that needs to be set in the defined context path. Placeholders can be used to obtain data from the context. Mappers can be applied to format the data.

Guide

Here, we have explored how you can combine two strings (or fields0 together.

Step 1: Click on Add Data Transformer and select Value Setter transformer.

Step 2: Set up the Value Setter configuration next.

Step 3: Specify the Key (where the combined strings will be saved, let’s say X)

Step 4: Next, select the Value (Strong in this case). Place two value holders with the strings that you want to combine. Let’s consider two strings, String A and String B. In this case, you have to input: &{A} &{B}

Step 5: Upon clicking the Run Test button, you will observe that the transformer has saved the combined value of A & B in X.

Video guide