Complex Complex Expresion in Transformation Rules

ZAH
New Contributor

Hello Everyone, 

 

Is there a way to force the composite expression to run before the One To One Rules ? 

i am trying to run a complex expression to override values coming from the Source Data. but the One To One Mapping is triggering the mapping, what i want to Select all BS accounts from source based on the Target mapping , and import UD2 as a None Value . Instead what is happening is that all the BS accounts with UD2 value are being Mapped based on the One To One mapping i did for the PL Accounts. and i only want the PL accounts to have a UD2 Value.

 

 

 

1 ACCEPTED SOLUTION

ChristianW
Valued Contributor

In your case, I would suggest using composite rules instead of on-to-one mapping to differentiate mapping behaviours depending on the ud2 value. Also, composite rules have access to complex expressions and they are only slightly more complex than one-to-one.

View solution in original post

4 REPLIES 4

ChristianW
Valued Contributor

In your case, I would suggest using composite rules instead of on-to-one mapping to differentiate mapping behaviours depending on the ud2 value. Also, composite rules have access to complex expressions and they are only slightly more complex than one-to-one.

ZAH
New Contributor

thanks for the help, Christian, but how can include the One-to-One mapping in the Composite rule? is there anything special i have to put in the Rule Expression to map the Source to a Target ? 

ChristianW
Valued Contributor

 Just add the dimensional prefix, in case of an account mapping: A#1234567 becomes 60000:

ChristianW_1-1681228367496.png

 

I would keep the number of composites to a minimum because they are not as straightforward to administer. You only need to have 1 composite to set the UD2 to None for BS accounts - I would use the BRApi.Utilities.TransformText function in a Business Rule (set the source expression to UD2#*). Create a lookup table for the BS accounts and the Business Rule returns None if the account is BS, otherwise it returns nothing. Then put all the UD2 maps in the List type similar to the current One-to-One maps. I haven't tested it but it should work.