
1. Re: Function: Count()
TSGal May 31, 2016 9:13 AM (in response to gcatnine)gcatnine:
Thank you for your post.
The calculation "R Calculated" is already based on a repetition. The script is capturing a calculation, and then placing that result in a repetition. Therefore, change your formula to extract the specific repetition you want to count before placing the result in the desired repetition in "R". That is, change your script as follows:
Set Field [ test repetition::R ; Count ( R1 ; R2 ; R3 ) ]
Set Field [ test repetition::R[2] ; Count ( R1[2] ; R2[2] ; R3[2] ) ]
Set Field [ test repetition::R[3] ; Count ( R1[3] ; R2[3] ; R3[3] ) ]
Set Field [ test repetition::R[4] ; Count ( R1[4] ; R2[4] ; R3[4] ) ]
TSGal
FileMaker, Inc.

2. Re: Function: Count()
gcatnine May 31, 2016 9:31 AM (in response to TSGal)Thank you TSGal,
but that is not what the manual says (FileMaker Pro 15 Help ):
the formula is:
Count(Field1;Field2;Field3) returns 3, 2, 1, 1 when the calculation is a repeating field.
So, or the Count function does not work as expected, or the manual is wrong.
ciao
Gianandrea

3. Re: Function: Count()
TSGal May 31, 2016 11:36 AM (in response to gcatnine)gcatnine:
"R Calculated" is a calculated repeating field. The example is correct and will return the correct value.
"R" is not a calculation, but a repeating field. However, I would expect the same value (3) in each instance of the repetition since you are obtaining the first repetition value of fields F1, F2 and F3 and placing that value in each of the repetitions of "R". I have sent this information to our Development and Testing departments for review. When I receive any feedback, I will let you know.
TSGal
FileMaker, Inc.