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!
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.
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.
Circled in Red:
Hi there - that selection option is not available for me (Filemaker Pro 12, Mac). See screenshot...
Actually it is. I checked that before I uploaded.
You have defined a number field with an auto-entered 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.
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!