Learning Looping Power - Part 1

One of the first times I really started feeling like I "knew" how to "really" do things in FileMaker, was when I started to take serious advantage of loops.

In many processes, which have a sequence of recurring steps, the most efficient, and certainly most effective, way to tackle the task is with a loop.

Here's a very simple example. Which is more flexible?

Set Field [ some_field ; some_field & data_1 ]
Set Field [ some_field ; some_field & data_2 ]
Set Field [ some_field ; some_field & data_3 ]
Set Field [ some_field ; some_field & data_4 ]
Set Field [ some_field ; some_field & data_5 ]

or

Set Variable [ data_to_process ; data_1, data_2, data_3, data_4, data_5 ]
Loop for each piece of data
Set Field [ some_field ; some_field & current_data_piece ]
End Loop

Obviously, a trick question, because the later is more flexible. It can use an indeterminate number of pieces of data, whereas the first example is currently limited to five. To extend beyond the limit of five, you'd have to modify the script.

And the advantages go beyond just this one simple point.

In this video (and it's second part), I walk through a number of looping scenarios and show you some very powerful stuff. Stuff which not a whole lot of FileMaker developers know. Mixing in some record creation techniques, which is very common within loops, and you've got some extremely powerful knowledge.

If taking full advantage of looping and what FileMaker can do is one of your primary goals, then this video, and it's companion, are sure not to disappoint!

AttachmentSize
LearningLoopingPower.zip248.58 KB

Comments

Matt:

I can't download from Mac using Cntl-Click. What I get is an HTML file called for example:

LoopingPower2_Full.mov.html

Suggestions? Haven't I been here before?

Thanks, Monte...

Monte

15 mins in when you do the magic with the creating records through the relationship.
Do you have any other stuff which explains this more slowly, or breaks it down, as I appear to be COMPLETELY lost, and without it my understanding of the rest of the technique pretty much fails??