Genx Posted August 10, 2006 Posted August 10, 2006 ... 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
Ender Posted August 10, 2006 Posted August 10, 2006 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.
comment Posted August 11, 2006 Posted August 11, 2006 And for a basic example of using repeating fields for recursive calculations, see here.
Genx Posted August 11, 2006 Author Posted August 11, 2006 Much appreciated guys -- visualising it as an array helps a load.
Recommended Posts
This topic is 6741 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now