August 10, 200619 yr ... Could someone please explain to me how the heck you use these things, how you access data in particular repetitions, how calculations in different repetitions of a field are evaluated, if you enter different calcs into different reps of a field... just plain old confused - i mean, there's something in FM i don't know how to use at all - even if it is outdated in most cases - i'm sure it still has some uses. Cheers, ~Genx
August 10, 200619 yr Think of a repeating field as an array. There are a set number of slots for holding data, and they can be accessed by their address (or index). The syntax for accessing the value in a particular repetition is: GetRepetition(RepeatingField; index) or (since FM7) RepeatingField[index] For setting a particular repetition, you'd need to use the Repetition option of the target field in the script step you're using. In FM8 and later, you can dynamically choose the target repetition with the optional Repetition calc. Repeating fields aren't very useful for data storage, but they are still used for storing values for utility purposes (like graphic constants), and sometimes for calculating results that are easier to resolve with the repeating field's get(CalculationRepetitionNumber) iterative properties (FM7 or later). For an example of repeating fields used for utility purposes (with the repetition calc), check my Progres Bar example here: http://www.fmforums.com/forum/showtopic.php?tid/137110/ Hopefully it won't flash at you too much.
August 11, 200619 yr And for a basic example of using repeating fields for recursive calculations, see here.
Create an account or sign in to comment