I am really hoping that you will be able to help me with a problem I have had for the past few days.
The scenario I have requires a logic group to be created as source data needs to be mapped differently if its +ve or -ve even thought the source account is the same.
I created a complex logic group and added the corresponding logic group account into the account mapping table. The group uses the rule definition 001806*
The accounts that would be impacted by this rule are below with the values:
18060015 -8000000 (has ICP partner)
18060015 -3319512.13 (has ICP partner)
The +ve values need to go to an asset account and the -ve values to a liability account.
At the import stage I have a a value of zero which appear to be the sum of the top 4 values, the bottom 3 values then appear on individual rows.
At the validate stage the HFM asset account displays the 3 +ve values (15.8M) despite 2 of them seemingly netting off to zero with the first and third -ve values. The liability account however only shows the bottom 2 vlaues (11.3M) as its missing the 2 other -ve values. The HFM asset and liability values should be the same
In the account mapping I am using the following script for the +ve (its been reformatted for this forum):
'If varValues(9) > "0" Then Result = "BSA401000" Else Result = "Ignore" End If
The -ve script is:
'If varValues(9) < "0" Then Result = "BSL625600" Else Result = "Ignore" End If
I have subsequently changed the Logic Group to be Simple but I get a similar result even though what I'm looking to achieve seems to be detailed in the FDM Admin Guide under the Creating Accounts Within Simple Logic Groups section
I appreciate its a bit long winded so apologies, if you need further information then please let me know and I will happy to provide more
I am not sure why you need to use logic accounts if you are simply posting to different targets based on the value. why cant you just have the script on the mapping record as:
If varValues(9) > "0" Then Result = "BSA401000"
ElseIf varValues(9) < "0" then Result = "BSL6256002"
Else Result = "Ignore"
Sorry if the VB is not 100% but a bit rusty.
Thanks for the quick answer, the reason for haviing the logic group is to create a new account to deal with the -ve, any values that hit the BSL account needs to have the signage switched.
I have tried to have if >0 then BSA else BSL on the same line in the account map, but then I get the issue where I cant tick the change signage box for just the BSL element of the rule
Ok. In the admin guide there is an example of what you are trying to do (Page 70 in the 11.1.2 doc) creating an asset and liability account. All you need to do is for the liability account multiply the curval by -1.
In the mapping table, map the original source codes to ignore, and map the new logic accounts to the correct targets.
(Logic accounts are created after the data is imported but before the maps are executed)
So you end up with something like:
Item Desc type Criteria Val Operator Value/Exp Seq Exp
L18060000A Asset Test In 18060000 function If curVal > 0 then Result = CurVal else Result = "Skip" end If 0 Tick the box
L18060000L Liability Test In 18060000 function If CurVal < 0 then Result = Curval * -1 Else Result = "Skip" End If 5 Tick the box
then a second set for the other account. If all accounts in this range need testing then try the criteria as Like 1806*
(The EXP box determines if the record gets exported so should be flagged.
Sorry but the formatting has changed form what i typed in but hopefully you can follow the column contents
Edited by: user10757003 on 18-Oct-2012 14:05
Edited by: user10757003 on 18-Oct-2012 14:08
You could still set up two mapping rules and avoid the added complexity of a logic rule if you would like. The mapping will continue to the next line if it does not meet the test and there is no result.
Asset side would be with a rule name of vAsset (you can change that but it needs to be unique to the next line)
If varValues(9) > 0 Then Result = "BSA401000"
and then you would add a second line to your map with a rule name of vLiab, and check the flip sign.
If varValues(9) < 0 then Result = "BSL6256002"
In the past I have avoided logic rules wherever possible, as adding them removes the ability to drill into the source file.
Many thanks to both JTF85 and 10757003.
Sometimes you dont see the wood for the trees and as JTF85 suggessted I managed to do all I needed to in just the maps, I agree that avoiding Logic Groups where possible is a good thing.
I just need to test a few more things, not had the time in the past few days hence the lack of thanks, and then I'll mark this as answering my question.