Level 1

0% to

Level 2

Tip /

to gain points, level up, and earn exciting badges like the new
Mission!

View all

## Formcalc sales order.

Level 1

Hi everyone. I'm currently working on a sales order but i bounced into some problems.

I Have 2 Fields

QuantityTotal

The thing is I want an embedded price inside my Quantity such as: "Total=Quantity*150" in excel this would work perfectly fine. I have made dummy fields that I turned invisable, but with 120 products this can be messy.

Anyway, everytime the Quantity amount goes above 20 the price is gonna change from 150 to 125, and when it goes above 50 it gonna change again, from 125 to 100, and above 200 to price with be 75 for each quantity.

I'm abit desprate here but, if anyone could post a script that would work that i could work my headaround I would be so Greatefull.

Love susanna.

Level 10

Hi,

this task is generally not that complicated.

FormCalc is a very powerful scripting langunge with an easy to learn syntax.

For your task you need a logic, that checks the value of the Quantity field, to set another value, let's name if factor, to a specific value.

Then multiply those two values with each other.

Here's a small FormCalc script for the calculate event of the total field.