Using Case Statement in Additional Column
I’m trying to add a case statement to an additional column in SmartConnect.
The looking up the 1099 part works great, however, I needed to add a case statement that if the 1099 doesn’t equal one and the DistributionReference column contains the following text, then return the Document Amount, otherwise, return 0.
Any help would be appreciated!
if _TEN99TYPE<>1
THEN
Select Case _DISTRIBUTIONREF
Case _DISTRIBUTIONREF.trim()=“Pay”
Return _DOCAMOUNT
Case _DISTRIBUTIONREF.trim()=“Bonus”
Return _DOCAMOUNTCase _DISTRIBUTIONREF.trim()=”Fee Deduction”
Return _DOCAMOUNTCase _DISTRIBUTIONREF.trim()=“Gas”
Return _DOCAMOUNT
End Select
else
return 0
END IF
The looking up the 1099 part works great, however, I needed to add a case statement that if the 1099 doesn’t equal one and the DistributionReference column contains the following text, then return the Document Amount, otherwise, return 0.
Any help would be appreciated!
if _TEN99TYPE<>1
THEN
Select Case _DISTRIBUTIONREF
Case _DISTRIBUTIONREF.trim()=“Pay”
Return _DOCAMOUNT
Case _DISTRIBUTIONREF.trim()=“Bonus”
Return _DOCAMOUNTCase _DISTRIBUTIONREF.trim()=”Fee Deduction”
Return _DOCAMOUNTCase _DISTRIBUTIONREF.trim()=“Gas”
Return _DOCAMOUNT
End Select
else
return 0
END IF
Answers