![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have set up a database for quoting jobs. I'm having problems with setting up a formula to do the following: I have a field with radio buttons for 1,2,3,4 and 1/4 folds. Depending on quantities, there are different rates for 1, 2, 3, 4 and 1/4 folding. I am able to set up for 1 fold using the "if" function (fold = 1). But when I try to use "or" and set up the "if" (fold=2), the formula doesn't recognize fold=2 but it does recognize when I select 1. Can anyone shed some light on how to setup? Thanks in advance. Jim |
#3
| |||
| |||
|
|
I have set up a database for quoting jobs. I'm having problems with setting up a formula to do the following: I have a field with radio buttons for 1,2,3,4 and 1/4 folds. Depending on quantities, there are different rates for 1, 2, 3, 4 and 1/4 folding. I am able to set up for 1 fold using the "if" function (fold = 1). But when I try to use "or" and set up the "if" (fold=2), the formula doesn't recognize fold=2 but it does recognize when I select 1. Can anyone shed some light on how to setup? Thanks in advance. Jim |
#4
| |||
| |||
|
|
In article <NuyHf.381$Pn5.233 (AT) fe07 (DOT) lga>, "JSL" jimgoblue2001 (AT) hotmail (DOT) com> wrote: I have set up a database for quoting jobs. I'm having problems with setting up a formula to do the following: I have a field with radio buttons for 1,2,3,4 and 1/4 folds. Depending on quantities, there are different rates for 1, 2, 3, 4 and 1/4 folding. I am able to set up for 1 fold using the "if" function (fold = 1). But when I try to use "or" and set up the "if" (fold=2), the formula doesn't recognize fold=2 but it does recognize when I select 1. Can anyone shed some light on how to setup? Thanks in advance. Jim I'm guessing you trying to do something like: Rate = If (Fold = 1, {result for 1}) or If(Fold = 2, {result for 2}) which isn't going to work due to the way that logic works within computers work. You can nest If functions inside each other, but that very quickly gets messy and difficult to read. Instead of If, you're better to use the Case function. Case is like a multi-choice If function, so you have something like: Rate = Case( Fold = 1, {the result for 1}, Fold = 2, {the result for 2}, Fold = 3, {the result for 3}, Fold = 4, {the result for 4}, Fold = 1/4, {the result for 1/4} ) This basically says that "In the case of Fold = 1 give the result {the result of 1}, or in the case of Fold = 2 give the result of {result of 2}, etc. Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) |
#5
| |||
| |||
|
|
I have set up a database for quoting jobs. I'm having problems with setting up a formula to do the following: I have a field with radio buttons for 1,2,3,4 and 1/4 folds. Depending on quantities, there are different rates for 1, 2, 3, 4 and 1/4 folding. I am able to set up for 1 fold using the "if" function (fold = 1). But when I try to use "or" and set up the "if" (fold=2), the formula doesn't recognize fold=2 but it does recognize when I select 1. Can anyone shed some light on how to setup? Thanks in advance. Jim |
#6
| |||
| |||
|
|
There are plug-ins that could invoke the script after the source field data is entered, rather than waiting for a button to be clicked - something that would be useful in FM8+. Microsoft Access has had this feature since version 1! |
#7
| |||
| |||
|
|
Depending on the circumstances and the complexity of the calculations it is sometimes better to write some script to do the job and have a "calculate" button on the layout to invoke that script. This is instead of trying to do the calculation within the very limited logic of a formula within a calculated field. Remi-Noel's caution about the order of the statements (for the Case command) also applies here. |
![]() |
| Thread Tools | |
| Display Modes | |
| |