Forum Discussion
MarkShnier__You
5 years agoQrew Legend
It's actually not good practice to program the prices into a formula for a few reasons. The right way to do this is really to have table of suppliers with their prices and then have a relationships where 1 supplier has many "orders". Then lookup the price. You would then actually want to use what is called a snapshot field to freeze the value of that lookup since when the prices change you do not want all your historical orders to change their price.
But f you did want to hard code the pricing
IF(
[Supplier] = "Supplier A" and [Premium unit]=true, [Unit Count] * 20,
[Supplier] = "Supplier A" and [Premium unit]=false, [Unit Count] * 18, // non premium is less expensive
[Supplier] = "Supplier B" and [Premium unit]=true, [Unit Count] * 21, // supplier B is a bit more expensive.
[Supplier] = "Supplier B" and [Premium unit]=false, [Unit Count] *20) // two slashes mean a comment
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
But f you did want to hard code the pricing
IF(
[Supplier] = "Supplier A" and [Premium unit]=true, [Unit Count] * 20,
[Supplier] = "Supplier A" and [Premium unit]=false, [Unit Count] * 18, // non premium is less expensive
[Supplier] = "Supplier B" and [Premium unit]=true, [Unit Count] * 21, // supplier B is a bit more expensive.
[Supplier] = "Supplier B" and [Premium unit]=false, [Unit Count] *20) // two slashes mean a comment
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
- GregVasilion5 years agoQrew MemberIt's that easy! Thanks Mark, I agree on the price programming, I altered the variable from what we're actually using, this is for a pretty special case. Thank you!
------------------------------
Greg Vasilion
------------------------------
Related Content
- 9 months ago