Forum Discussion
NicolasArgente
2 years agoValued Contributor
Hi GorkemSenol
It sounds like you do not have quality data in your source for your IC. I would suggest that you solve this in your source.
An alternative could be to do the "opposite" and map all your accout and then use a mask rule to map all the rest to IC#None using * to None. That would be the easiest option.
Nic
GorkemSenol
2 years agoNew Contributor III
Thanks Nicolas,
Yes but it's not an option to fix the issues in the source at the moment. I've written an expression to check if the target accounts ICP property is set to True or false. But since this mapping is being picked up by all the lines, the rest of the mappings are completely ignored. I'm sharing my expression below:
'Grab the target account value
Dim vaccount As String = args.GetTarget("A#")
Dim vAcc_ID As Integer = BRApi.finance.members.Getmemberid(si,dimtype.Account.ID,vaccount)
'Grab the is IC property
Dim vAccountIC As String = BRApi.Finance.Account.IsIC(si, vAcc_ID).ToString
Dim vIC As String = args.GetSource("IC#")
'brapi.ErrorLog.LogMessage(si, vaccountic)
If (vAccountIC = "FalseValue") Then
Return "None"
' Return args.GetSource("IC#")
Else
This should allow the mapping for these accounts should be done normally
End If
Related Content
- 2 years ago
- 2 years ago