crystalpro
Technical User
Commission is based on who the sales rep is and what product is sold. The item type field stores the value of "1" for one type of product and "2" for the other type of product.
The commission rate is stored in a text field for the sales rep.
I want to change the text field to a numeric field so I can multiply it by the sales amount depending on the condition if the product sold is a type 1 or 2.
Here's what I tried:
if NumericText ({Employee.CustomField1}) then ToNumber ({Employee.CustomField1});
if NumericText ({Employee.CustomField2}) then ToNumber ({Employee.CustomField2});
if {LineItem.ItemType} = "1" then {JrnlRow.Amount} * ToNumber({Employee.CustomField1}) else if {LineItem.ItemType} = "2" then {JrnlRow.Amount} * ToNumber({Employee.CustomField2})
Nothing appears in my Commission column on the report.
Any help is greatly appreciated.
The commission rate is stored in a text field for the sales rep.
I want to change the text field to a numeric field so I can multiply it by the sales amount depending on the condition if the product sold is a type 1 or 2.
Here's what I tried:
if NumericText ({Employee.CustomField1}) then ToNumber ({Employee.CustomField1});
if NumericText ({Employee.CustomField2}) then ToNumber ({Employee.CustomField2});
if {LineItem.ItemType} = "1" then {JrnlRow.Amount} * ToNumber({Employee.CustomField1}) else if {LineItem.ItemType} = "2" then {JrnlRow.Amount} * ToNumber({Employee.CustomField2})
Nothing appears in my Commission column on the report.
Any help is greatly appreciated.