
1. Re: Help with IF and Calculations using repeating fields
StewartCampbell_1 Apr 24, 2012 1:23 AM (in response to StewartCampbell_1)I have realised I maybe don't need an IF function because if price will be USD=USD then I can set the exchange to 1. So the formula that now works for the first repetition is:
Round ( GetRepetition ( prices original ; 1 ) * currencies::currency rate to USD ; 2 )10
I still want to know to correct syntax to repeat this to the rest of the repetitions. Is it nested inside the round?
Thanks in advance!

2. Re: Help with IF and Calculations using repeating fields
philmodjunk Apr 24, 2012 11:57 AM (in response to StewartCampbell_1)Is currencies::currency rate to USD a single field or a repeating field? If it's a single field whose value is to be used with all repetitions of prices original, use:
Round ( Prices original * extend ( currencies::currency rate to USD ; 2 )  10
And specify the same number of repetiions for this calculation field in the number of repetitions box as you have defined for prices original.
Haven't used extend in a real FileMaker database in years as using a table of related records is almost always a better option that using a repeating field.

3. Re: Help with IF and Calculations using repeating fields
StewartCampbell_1 Apr 24, 2012 12:34 PM (in response to StewartCampbell_1)Thanks very much Phil  really appreciate your reply! But where do you specify the number of repetitions for the calculation? The formula still works for the first repetition but does not affect the others.
If I can't work it out then maybe as you suggest better to rework the database to have multiple related fields instead of a repeater.

4. Re: Help with IF and Calculations using repeating fields
philmodjunk Apr 24, 2012 1:35 PM (in response to StewartCampbell_1)Circled in Red:

5. Re: Help with IF and Calculations using repeating fields
StewartCampbell_1 Apr 24, 2012 2:38 PM (in response to StewartCampbell_1)Hi there  that selection option is not available for me (Filemaker Pro 12, Mac). See screenshot...

6. Re: Help with IF and Calculations using repeating fields
philmodjunk Apr 24, 2012 2:52 PM (in response to StewartCampbell_1)Actually it is. I checked that before I uploaded.
You have defined a number field with an autoentered calculation. Click the strorage tab in field options and you'll see the same control for specifying repetitions. You may need to define this field as a field of type calculation instead of number.

7. Re: Help with IF and Calculations using repeating fields
StewartCampbell_1 Apr 24, 2012 11:48 PM (in response to StewartCampbell_1)Thank you thank you! That was the trick  to change the field type to a calculation. Then the repetition no.s showed up the same as your screen shot.
Really appreciate your help!