Single Pass Loops

In the world of programming, there are various concepts you need to understand in order to create software which is both functional and resilient. Maintaining that code may be another challenge, but if you don't learn about exception handling and determining if your processes truly succeed or fail based on expectations, you risk inviting more errors and failures than you might anticipate.

In this video, we'll cover several critical aspects of a FileMaker database solution. Yes, FileMaker Pro is intended to be an "easy-to-use" or "low-code" platform. While it certainly presents itself as low code, that's only the beginning. Solving the problem is just the start; learning about exception handling, transactional data interactions, and the all-important try/catch pattern is essential. However, FileMaker doesn't offer the common try/catch option.

So, what's the alternative if we don't have try/catch? Well, we make use of the Loop script step because it allows for multiple Exit Loop If[] conditions. This, in essence, is where we can creatively use and even "abuse" our old friend, the Loop script step.

If you've never used the Loop step to handle multiple errors while solving a complex process, this video should clarify a lot about how to approach it. Along the way, we'll also cover some valuable insights related to the recent transaction steps introduced in newer versions of FileMaker Pro.

AttachmentSize
SinglePassLoops.zip1.73 MB

Comments

Thanks for this "very" informative video. I learned a lot about FileMaker transactions as for me the documentation for them was a bit confusing. And as for the "Single Pass Loop" » I love the concept and I think I will try to use it in a few of my solutions. Thanks again for covering this topic.

Dominick Capobianco

When I click in any of the links, I am getting an error page from Vimeo. I am logged into my account correctly.

Hello,
You mention in rare case to use the open transaction when creating a new record.
What do you think about using it to solve my problem:
Users use the mobile to punch-in time sheet, a service call is created and the user will select that, add the work sheet number, time to complete de job, add a 2nd employee if require and commit. So from the service call db I can link the employee's time.

My problem is when the start the process, and close they don't complet it, send the app to sleep or swutch iOS app. Then at some pint the recoard will be commited even if they didn't tap the "OK" button. And a related record will be created with partial or empty values.

The use of global fields was a solution, but that will require a lot of worj since I have multiple table involve and I would have to redesign the whole script and layout.

Will open transaction in this case be a easier solution ? if the script doesn't complete, there will be no record creation ?

Thanks