You use the following syntax:
where 1 is the repetition number you wish to target.
Now having a problem with writing/editing the repeating field. What is the best documentation source for these questions?
This does not work:
$FMEditCommand -> setField (('Grid_Location_Name', $x), "Test");
The syntax for setting a field and specifying the repetition number is similar to retrieving the field value. This is from the PHP API documentation which you can find in your FileMaker Server folder. On my Mac it's found at:
/Library/FileMaker Server/Documentation/PHP API Documentation/index.htmlsetField (string $field, string $value, [integer $repetition = 0])
- string $field: Name of the field to set.
- string $value: Value for the field.
- integer $repetition: Field repetition number to set, Defaults to the first repetition.
$record->setField('firstName', 'Andrew') , 2 ;
where 2 is the repetition number you wish to target.
Thanks Andrew - appreciate the fast response.