I'm not very up on excel, so I will try to explain what I'm trying to do.
I'm setting up an online quote form for prospective clients. They enter how many hours they want to have our service, then the form will calculate whet the charge will be. But my problem is I want to charge rates dependent on the number of hours.
for example:
Hours Rate
1-14 9.50 15-24 9.00 25+ 8.66
how can I program this in my forms so it calculates automatically?
This is actually really tricky to do as far as we can tell. Our organization had a similar use case, and we tried to attack it with 'else if' statements in the form calculation fields. However, it seems that FA concatenates the code to eliminate spaces, so we handled it with a switch/case solution instead. I would love to know if there is a way to embed 'else if' syntax in here somehow.
(I realize that was a more technical answer than you were probably looking for - my hope is that FA will respond with a solution based on our mutual experience).
It's a little bit cumbersome, but it would work for you. Basically, you write a (very long) bit of Javascript that would go in a form calculation. For example, here's one that calculates the price of an item based on the quantity:
In this example, the variable (qty) is tested against different values for qty - (1), (2), (3), etc. all the way up to (5). Each number after the colon represents the price in dollars for that particular case. So, when the qty variable equals 3, the price equals 32.99. Anything above this is handled with the default, which is 29.99.
In your instance, you would need to write a statement that contains a case for every possible qty up to 25, after which you would specify a default.
In other programming languages you can use comparison operators in your cases to create ranges, but I haven't found a Javascript hack to do this.
I hope i'm not been a pain, but could you help me a bit more, I'm not very savy with this java language.
Please would you be able to start me off with say up to three, this way I should be able to carry on from there. at those hours we charge 9.80 per hour.