Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8077 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

Posted

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.

Posted

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).

Posted

Don't know that you'll "burn in hell" exactly... crazy.gif

But you might still be better off (and definitely no worse off) with fixed-length portals, I suspect! smirk.gif

Posted

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.

Posted

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. smile.gif

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.