Conditionally change calculation field based on "If" statement.

Discussion created by RyanAshton on May 14, 2016
Latest reply on May 14, 2016 by erolst

Hello guys,


So i have a product and services list.  Most of the products and services are supplied by other companies and I just add a % in the "HKDJ_%" field and include it in the cost estimate.  However, there are some services (and in the future, products) which are and will be supplied by my company "HKDJ Limited".


I have a "Supplier" field where the supplier name can go.  I also have an "HKDJ_Item" calculation field [Cost_Price * HKDJ_%] and also a summary field called "HKDJ_Total" that adds all the "HKDH_Items' together.


The problem is that when my company (HKDJ Limited) is the "Supplier", then obviously I don't put a percentage on top of the "Cost_Price" field and consequently, the "HKDJ_Total" field result is inaccurate.


Basically, if the "Supplier" = "HKDJ Limited" then I want the "HKDJ_%" to be 0 (zero) (and it can't be changed) and I want the "HKDJ_Total" = "HKDJ_Item * Quantity", else I want "HKDJ_%" to = what was originally entered and I want "HKDJ_Total" = "Cost_Price * Quantity"


I hope that makes sense.


I tried it out myself (see below), but the fields are displaying "?".


Screenshot 2016-05-14 15.46.34.png