This content has been marked as final. Show 7 replies
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:1 person found this helpful
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.1 person found this helpful
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.
So simple i did not think of that one.
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.
Thanks again JTF85 and 10757003, applying the split into the account mapping fixed my issue, much more simple than attempting it via Logic Groups!!