6 Replies Latest reply on Jan 4, 2012 10:44 PM by BruceHerbach

# Price

I have a repetition field called Price and I have a total at the bottom

I am getting to the total of my price field, but I would like to add 10% to this figure

How do I right this Calculation ?

Rgds Tony

• ###### 1. Re: Price

Hi Tony,

You don't indicate if you want the result in the field or in another field.  Assuming you want in the field,  you could use a let statemet.  Below is an example that puts the result in repetition 1.  This was tested using an autoenter calculation.  Changing the value of repetiion 2 or 3 gets the calculation to recalc.  For simplicilty I hardcoded the percentate at 10% (.1),  you could use a different field for this.

Let( [

a = test[2];

b = test[3]];

((a + b) * .10 ) + ( a + b ) )

Hope this helps

Bruce Herbach

• ###### 2. Re: Price

Hi Bruce

Thank you so much for your help, It works fine .

Rgds Tony

• ###### 3. Re: Price

You probably shouldn't be using a repeating field for this at all - but if you do, then a calculation field =

```Sum ( YourRepeatingField )  * 1.1
```

should do what you want.

• ###### 4. Re: Price

Tony,

comment's  version is more straight forward then the one I gave you.  The catch (if there is one) is that you you would put the result in a seperate field.  Not sure what would happen if you did this and put it into a repatition of the current field.

Of course you could be explicit in which repetions to sum, but then you are back to doing everything I gave you in the let statement, sort of.

The other thing that comment is implying is that using repeating fields to store prices like you are doing has been replaced by using related records.  This happened when version 7 came out with the relationship graph and multiple tables.  That stated,  there are still older systems out there and systems that have been updated to current versions.  With the conversion comes all of the repeating fields.... but I digress and have entered a very large topic.  Updating a database to replace repeating fields with related records can be large job.

Best of luck

Bruce Herbach

• ###### 5. Re: Price

BruceHerbach wrote:

The catch (if there is one) is that you you would put the result in a seperate field.

I thought that was an advantage, not a catch.

BTW, Filemaker has been relational since version 3.

• ###### 6. Re: Price

Your right... If I have the history correct,  I believe that in 7 they started letting you have multiple tables in a single file.  Before that it was 1 table per file.  So repeating fields were much more useful for things like this prior to version 7.

Bruce Herbach