![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am running FM7 on a Mac with 10.3.5. I am looking to have field that will do calculations. I need 15 iterations. "Price" will contain the starting price. There will be 15 price fields. "Number" will contain the number of items being priced. "Increment will contain the increment for the increase in each of the 14 subsequent" price fields. "Total" will contain the 15 calculated values using the formula: Total(1)=Price(1) * Number Total(2)=Price(2) * Number Total(3)=Price(3) * Number Etc. The "Price" field will be calculated as follows: Price(2) = Price(1) + Increment Price(3) = Price(2) + Increment etc. Obviously the Prices will have to be calculated before the Totals are calculated. Thanks in advance. Rich |
#3
| |||
| |||
|
|
I am running FM7 on a Mac with 10.3.5. I am looking to have field that will do calculations. I need 15 iterations. "Price" will contain the starting price. There will be 15 price fields. "Number" will contain the number of items being priced. "Increment will contain the increment for the increase in each of the 14 subsequent" price fields. "Total" will contain the 15 calculated values using the formula: Total(1)=Price(1) * Number Total(2)=Price(2) * Number Total(3)=Price(3) * Number Etc. The "Price" field will be calculated as follows: Price(2) = Price(1) + Increment Price(3) = Price(2) + Increment etc. Obviously the Prices will have to be calculated before the Totals are calculated. Thanks in advance. Rich |
#4
| |||
| |||
|
|
Don't get confused by dogma. Repeating fields can be useful. They're not useful in a relational data model because they break first normal form (more than one value per field) which among other things leads to complications later when querying. In layman's terms, it makes it hard to "Find" and isolate a given repetition and report on it. Substituting a bunch of fields for repetitions is NEVER the right path. It also breaks from the model, and again leads to querying and reporting issues. You substitute one set of problems for another. In your case, I suspect that a repeating field a appropriate. Why? Because you're not using it to store data, only to calculate and present a range of values based on single value fields. It's a simple reporting device. So go for it. Here's how to do it. |
#5
| |||||||
| |||||||
|
|
In article <2004101110545535705%nospam@nospamnet>, flamel nospam (AT) nospam (DOT) net> wrote: Don't get confused by dogma. Repeating fields can be useful. They're not useful in a relational data model because they break first normal form (more than one value per field) which among other things leads to complications later when querying. In layman's terms, it makes it hard to "Find" and isolate a given repetition and report on it. Substituting a bunch of fields for repetitions is NEVER the right path. It also breaks from the model, and again leads to querying and reporting issues. You substitute one set of problems for another. In your case, I suspect that a repeating field a appropriate. Why? Because you're not using it to store data, only to calculate and present a range of values based on single value fields. It's a simple reporting device. So go for it. Here's how to do it. Unfortunately, the problem with Repeating fields is that they've never been fully implemented |
|
(I'm not sure about FileMaker 7 here though). |
|
They were originally designed in the days of 'Flat File' databases as a temporary solution to real related data and should have been removed with FileMaker 3. |
|
There's one great example for this. There is a 'Get Repetition' function which allows you to choose the individual repetition by using the value in another field, but there's no equivalent 'Set Repetition' function - instead you have to use Set Field and hard code in the repetition number or use some other complicated workaround. |
|
Another example that VERY often crops up: if you use repeating fields for lines on an invoice, then you can't (easily) total up the invoice prices. |
|
Along with all the other hassles for Finds, Summarising, etc. when using repeating fields, it's simply best to avoid them ... in most cases. There are a few (EXTREMELY few) times when they can be useful. |
|
Some people use them for storing the various states of changeable buttons, for example, but again this is simply a problem for anyone trying to later change the solution (including themselves). It makes little sense to anyone to read: Set Field [MyButton, gButton State -2] but is much easier to understand as: Set Field [MyButton, gButton Ghosted] |
#6
| |||
| |||
|
|
But I don't agree there's a reason to wholesale toss repeating fields into the bit bucket or to steer guys like Rich away from simple answers to simple questions. |
#7
| |||
| |||
|
|
flamel <nospam (AT) nospam (DOT) net> wrote: But I don't agree there's a reason to wholesale toss repeating fields into the bit bucket or to steer guys like Rich away from simple answers to simple questions. Isn't there a FileMaker Clinic for repeatophobiacs?? ;-) |
#8
| |||
| |||
|
|
In article <1glkhnd.1g7rtnnsvna0mN%jrijnb (AT) xs4all (DOT) nl>, jrijnb (AT) xs4all (DOT) nl (Hans Rijnbout) wrote: flamel <nospam (AT) nospam (DOT) net> wrote: But I don't agree there's a reason to wholesale toss repeating fields into the bit bucket or to steer guys like Rich away from simple answers to simple questions. Isn't there a FileMaker Clinic for repeatophobiacs?? ;-) Nope, but there is one for Repeatoholics where you learn simple ways to never use them again. ;o) |
#9
| |||
| |||
|
|
In article <1glkhnd.1g7rtnnsvna0mN%jrijnb (AT) xs4all (DOT) nl>, jrijnb (AT) xs4all (DOT) nl (Hans Rijnbout) wrote: flamel <nospam (AT) nospam (DOT) net> wrote: But I don't agree there's a reason to wholesale toss repeating fields into the bit bucket or to steer guys like Rich away from simple answers to simple questions. Isn't there a FileMaker Clinic for repeatophobiacs?? ;-) Nope, but there is one for Repeatoholics where you learn simple ways to never use them again. ;o) Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) |
#10
| |||
| |||
|
|
Another example that VERY often crops up: if you use repeating fields for lines on an invoice, then you can't (easily) total up the invoice prices. |
![]() |
| Thread Tools | |
| Display Modes | |
| |