MicahMason Posted October 14, 2002 Posted October 14, 2002 I've been playing with FM 5 for a few weeks now, and am still trying to bend my programmer-trained mind around the FM script engine. I have grudgingly and painfully accepted the fact that local variables, procedure arguments, and return codes just aren't available. After reading through these forums a bit I hear a lot of people saying repeating fields are very limited. I've seen several cases where they were almost useful but due to limitations in the scripting support for them they just didn't cut it. What are the benefits of repeating fields, and where could they be used?
CobaltSky Posted October 14, 2002 Posted October 14, 2002 The question more properly should be re-cast as 'when were repeating fields useful... ...In which case the answer is that they were particularly useful in the late eighties when the then versions of FileMaker had less than the barest gestures towards relational capabilities. Upon the introduction of relational features in the early nineties, repeating fields were retained - primarily, one supposes, for the sake of backward compatibility. In fact one still encounters files in which remnants of repeating structures which were created ten years ago have survived into the present incarnations. There is little or nothing that can be achieved with repeating fields that can't be accomplished in another way - often with a better outcome. Although repeating fields sometimes seem appealling to novices, because of a somewhat deceptive appearance of simplicity in comparison to relational structures. The lack of scripting support and the cumbersome nature of calculations which reference repeating fields is the least of their ills. Their greatest drawback is the way their presence breaks the logic of any export/import procedure -particularly in the exchange of data between different data structures or different applications (since few other applications have an equivalent feature. A file with even one repeating field is no longer flat, nor is it relational. The 'heyday' of repeating fields precedes the introduction of global fields, however ironically, repeating fields most frequent use these days seems to be for storing and grouping GUI elements (eg variations on a particular button image for multi-state buttons). In this guise they are serviceable - though still non-essential from a functional viewpoint.
BobWeaver Posted October 15, 2002 Posted October 15, 2002 One of the few legitimate current uses of repeating fields is as an array of data. You can set up a global repeating field and populate it with data that you can then access with the GetRepetition() function. This is generally only useful for fixed data because although the GetRepetition() function can index a specific repetition in the field, there is no complementary SetRepetition() function for setting a specific repetition. A common use is to store a series of graphics that can then be selected dynamically. Other uses for repeating fields tend to be obscure programming tricks.
MicahMason Posted October 15, 2002 Author Posted October 15, 2002 Thanks a lot for your responses, they clear up a lot of my questions about repeating fields. I will be very careful about using them from now on. I appreciate the point about them being especially dangerous relative to export/import functionality - I can foresee that catching someone like me off-guard. On a vaguely related note, how is FM's SQL support? I've been thinking about using perl to do some importing.
falkaholic Posted October 15, 2002 Posted October 15, 2002 As stated CobaltSky they are very handy for making GUI elements. Go to http://www.layoutmode.com and in the templates section they have a few examples of whats going on. As well there is on posted as an attachment in the Right Brain section of this forum. Another use is for stuff like print outs where there is always a finite number of lines to use. For example, I'm doing a project that prints out custom NAFTA custom forms. It is way easier to use repeating fields (yes, I know I will burn in hell for using them).
CobaltSky Posted October 15, 2002 Posted October 15, 2002 Don't know that you'll "burn in hell" exactly... But you might still be better off (and definitely no worse off) with fixed-length portals, I suspect!
BobWeaver Posted October 16, 2002 Posted October 16, 2002 I'm doing a project that prints out custom NAFTA custom forms. No wonder we can't win this softwood lumber thing. You're using friggin' repeating fields.
falkaholic Posted October 17, 2002 Posted October 17, 2002 Well, I've inherited some projects where the original developer used repeating fields (along with neon greens and yellows) when portals would have been wonderful and did not appreciate it.
falkaholic Posted October 17, 2002 Posted October 17, 2002 hahah.. that might be true if the repeating fields weren't t-shirts. In which cause thats why we're loosing our shirts? (sorry best follow-up joke i could think of)
Recommended Posts
This topic is 8077 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