We are under construction!

You may experience downtime, errors or visual oddities, but we anticipate all will be resolved by the end of the day.

Forum Discussion

Nirod95's avatar
Nirod95
New Contributor
9 days ago

Understanding TR

Im having an issue with a transformation rule

where i have on stage :

- Account 5115-0001

-UD2 2350

-UD4 2020

That combination of dimensions is being assigned by the following TR

A#[5015~5115-0406~0408]:UD4#[2001~2010]:UD2#[2002~2203]

I believe the problem is in the Account range, but do not understand why. can someone explain the reason why?

  • MarcusH's avatar
    MarcusH
    Contributor III

    I am assuming you are using a Composite rule to map this. I can see 2 potential problems. First the Account maps:

    A#[5015~5115-0406~0408]

    The tilde (~) splits the start and end of the range. You have 2 tildes which means you have 3 items in your range specification. Do you want this range - start: 5015-0406 end 5115-0408? If so the range should be 5015-0406~5115-0408

    Secondly the UD2 Range is 2002~2203 and your source UD2 member is 2350 which is not in the Range.

    • Nirod95's avatar
      Nirod95
      New Contributor

      You are right about the UD2, the rule im using is this one, and its correct for UD2 and UD4 but should not be correct for account but it is assigning it when it should not.

      A#[5015~5115-0406~0408]:UD4#[2012~2080]:UD2#[2206~2999]

      as i expect the first 4 digits of the account be between 5015 and 5115 "-" and the last 4 be between 0406 and 0408, so the 5115-0001 should not be mapped. but it is being mapped

  • MarcusH's avatar
    MarcusH
    Contributor III

    The range map cannot be split like that. I suspect it is using 5015 as the start and 5115-0406 as the end. In which case 5115-0001 falls within the range. Range maps are tricky and can give unexpected results. Consider 3 range maps like this :

     

    A#[5015-0406~5115-0406]:UD4#[2012~2080]:UD2#[2206~2999]
    A#[5015-0407~5115-0407]:UD4#[2012~2080]:UD2#[2206~2999]
    A#[5015-0408~5115-0408]:UD4#[2012~2080]:UD2#[2206~2999]

     

    This will also map any source accounts beginning with 5016-xxxx, 5017-xxxx and so on. You are wanting to match two aspects of the source: 5015 to 5115 and 0406 to 0408. You will have to add a Complex expression or Business Rule. If you create a map like this: 

     

    A#[5015-0406~5115-0408]:UD4#[2012~2080]:UD2#[2206~2999]

     

    and then use the Complex Expression or Business Rule to check that the last four characters are 0406 or 0407 or 0408.