Learning to Master Looping

Without a fundamental understanding of some programming topics, it's often difficult to solve certain problems in the easiest possible fashion. In fact, one of the things I've enjoyed learning about programming is that more code isn't always better. Searching for the simple answer sometimes takes a bit more time. And, learning to solve the problem with less code is more enjoyable.

In this video, I walk through a simple process of massaging some data into a desired format. While the objective often seems simple, the solution isn't always obvious. Especially, if you haven't been programming for good amount of time. There's also those hidden tips or tricks which you don't really know about until you've invested the time into improving your craft.

I remember learning about writing loops in FileMaker and feeling the sense of power that comes with any type of data processing. To this day, most of programming comes down to looking for a pattern and then processing that pattern in some fashion. Usually, with a loop. As the seasons cycle and the fields wither and then return, such is the way of software. You find the pattern and process it with a loop.

Comments

Hey Matt,
During the pause in the looping video I created a single loop script for both consolidation and deletion.
It is similar to yours, but with 2 extra lines.
To me this seems more efficient.
Am I missing something here?

Sort Records [ Restore ; With dialog: Off ]
Go to Record/Request/Page [ Last ]

Loop

Set Variable [ $f1 ; Value: table::f1 ]
Set Variable [ $f2 ; Value: table::f2 ]

Go to Record/Request/Page [ Previous ; Exit after last: On ]

If [ table::f1 = $f1 ]
Set Field [ table::f2 ; table::f2 & ", " & $f2 ]
Go to Record/Request/Page [ Next ; Exit after last: Off ]
Delete Record/Request [ With dialog: Off ]
End If

End Loop

MColquitt

Matt

Brilliant presentation good to force us to try

Luv extra tips!

Keep up good work

Stephen O'Connell