3 Replies Latest reply on Jan 20, 2010 8:14 PM by JTF85

# Conditional Mapping issue - Need help Urgently

Hi Experts,

We have a requirement for conditional mapping for HFM. When the value of certain account is positive, it is mapped to one account, else, to a different account. We are able to achieve this in the conditional mapping.

Once the mapping is done, we need the amount to be positive one. How do we attain this?

Thanks
Kannan.
• ###### 1. Re: Conditional Mapping issue - Need help Urgently
Hi,

Lets say your two target accounts are called X & Y.

I assume in your account mapping you have something like
Source account xxxx1 ==> Target account X
Source account yyyy1 ==> Target account Y

Here is what you can do.

In the import script of Account you can check the amount value < 0 and assign to account X else to account Y and assign to the out variable.

In the import script of Amount you can check if the source account is xxxx1 or yyyy1 then always assign abs(amount value) and assign to the out variable.

In the account mapping,

If you wish you can retain the below (with the account script change as I suggested, you will never get xxxx1 or yyyy1 in the out variable anymore)

Source account xxxx1 ==> Target account X
Source account yyyy1 ==> Target account Y

And add the two additional entries (since out variable for the two conditions will be X & Y)

Source account X ==> Target account X
Source account Y ==> Target account Y

Hope this helps, we have plenty of these kinds of situtations.

Regards
Ajay
• ###### 2. Re: Conditional Mapping issue - Need help Urgently
Suppose source accout is A

Create a Logic account B. Write a rule if the value of A < 0 assign to B
Create a Logic account C. Write a rule if the value of A > 0 assign to C

Now suppose Target accounts are X1 and Y1 for -ve and +ve value

Map
B to X1
C to Y1

Hope this helps you

Nick
• ###### 3. Re: Conditional Mapping issue - Need help Urgently
While logic works, it does destroy the ability to view the source file, you could set up two In mapping rules or Like or Between with a script on it

If varvalues(9)>0 then Result = "TARGET ACOUNT" with no flip sign

then a second rule

If varvalues(9)<0 then Result = "TARGET ACCOUNT" with a flip sign

regards
JTF

Edited by: user10316846 on Jan 20, 2010 3:14 PM