Hi,
I have a requirement where I have to change the amount sign while importing the data file in FDM, I am aware of the sign flip at the mappings where can switch the sign based on the account. The requirement which I got is a bit different.
I was given 40 pairs of Accounts and Custom3 members and I will have to switch the sign for those 40 pairs.
For example:
1. Account - Cover_Premiums and Custom3: Gross
2. Account - Cover_Claims and Custom3 - Reinsurance share
If the data file is having the above mentioned pairs then the amount of those only should change.
I wrote an import script and attached to amount dimension in the import format. The script is
if len(strfield) > 0 and Account = Cover_Premiums and Custom3 = Gross then
signflip = strfield*-1
else
signflip = strfield
if len(strfield) > 0 and Account = Cover_Claims and Custom3 = Reinsurance share then
signflip = strfield*-1
else
signflip = strfield
End if
End If
End Function.
The script ran fine after saving is working fine when file is imported and its flipping the sign for the records but the problem is its flipping the sign for all the records in the data file.
I assume that its executing the if statement only till the len(strfield)>0 and its not executing the rest of the condition in the if statement. ie: Account = Cover_Premiums and Custom3 = Gross.
I am not an FDM expert and not even sure if this is the right approach to do it or not.
This is a very critical requirement for me, please help me with this issue.
Thanks in advance.