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
- GorkemSenol2 years agoNew Contributor IIIThanks 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 valueDim vaccount As String = args.GetTarget("A#")Dim vAcc_ID As Integer = BRApi.finance.members.Getmemberid(si,dimtype.Account.ID,vaccount)'Grab the is IC propertyDim vAccountIC As String = BRApi.Finance.Account.IsIC(si, vAcc_ID).ToStringDim vIC As String = args.GetSource("IC#")'brapi.ErrorLog.LogMessage(si, vaccountic)If (vAccountIC = "FalseValue") ThenReturn "None"' Return args.GetSource("IC#")ElseThis should allow the mapping for these accounts should be done normallyEnd If
Related Content
- 2 years ago
- 2 years ago