5 Replies Latest reply on May 27, 2017 6:58 AM by 3436419

    Conditional Mapping

    3436419

      Hi,

       

      I have some accounts which need to upload the balances to due from RP account and Due to RP account. I need to mapping for below

      If accounts 857644, 3454345, 34587678  amount is greater than zero transfer balances to 98743221

      If Accounts 323454, 234345, 4565567   amount is less than zero then transfer to 56754543.

      Anyone pls help with scripting this solution. Thanks

       

       

      Regards,

       

      Mark

        • 1. Re: Conditional Mapping
          SH_INT

          Create an IN mapping for the Account Dimension listing the accounts you want to apply the conditional script to in the Source then put the expression #SQL in the Target and enter the following script:

           

          CASE WHEN AMOUNT > 0 THEN '98743221' ELSE '56754543' END

          • 2. Re: Conditional Mapping
            Alex_UK

            I have the same thing where a cash/overdraft needs to be different target accounts depending on the balance.

            I used a multi dimension mapping:

             

            ACCOUNT=[000053C03P:000] AND AMOUNT<=[0]    ...target account = X

            ACCOUNT=[000053C03P:000] AND AMOUNT>=[0]    ...target account = Y

            • 3. Re: Conditional Mapping
              3436419

              Hi,

               

              I have tried SQL mapping but we need to change sign at same for these accounts, when I did sign change and having script it's not working. Here sign is not working but Accounts are mapping accordingly. Here script applying for source values. Could you guys  please give how to achieve there

              • 4. Re: Conditional Mapping
                Francisco Amores

                Try this if you want to switch the sign when amount is positive

                 

                CASE WHEN AMOUNT > 0 THEN '98743221' ELSE '56754543' END

                ,AMOUNTX = CASE WHEN AMOUNT > 0 THEN -AMOUNTX ELSE AMOUNTX END

                • 5. Re: Conditional Mapping
                  3436419

                  Hi there,

                   

                  We have some balances coming from EBS having two same pov combinations one is having  positive value like 100 and another  balance -100 with same combination.Here it should be zero. If I write  above script our balance sheet is not matching. Any could suggest me the solution.