Skip to main content

I need to make a field transformation such that if the field value starts with “DOK”, then I want to replace the value with “1001”. I tried to set up this custom field transformation using something along the lines of CASE WHEN …, but didn’t manage to get this to work. How would I write this code in TX?

Hi @Vojtech Kurfurst ,

 

the best way to implement IF-THEN-ELSE constructions is by using Fixed transformations and conditions:

In this example TimeXtender will load the Description from the ODX and only replace with 1001 if the Descriptions starts with DOK . The basic approach is to have Data Movement or Fixed Transformation as the default (the ELSE) and then add transformations with conditions (IF THEN) for all the cases you want to support. There is no break statement, so all transformations fall through. This means your conditions should lead to disjunct cases, or you need to depend on the ordering of the transformations (most specific case last).


Perfect, worked like a charm. Thanks!


Reply