Level: Intermediate

Replace + GetNthRecord to Fill Down

This afternoon I pulled this data into FileMaker from a spreadsheet, and needed to “fill down” the region names in f2.

Of course I could have filled the region down in Excel prior to importing, but here I was already in FM. At first I was going to use a looping script, but then it occurred to me that it would be nice if Replace could do the trick.

I was curious whether this Replace logic would work…

Yep, works just fine.

5 thoughts on “Replace + GetNthRecord to Fill Down”

  1. I like it. I always had a looping script and using the value in a variable. It “fills” the next record, unless the value was already there, then it changes the variable used. But this does that with the Replace. Beauty!

  2. I’m assuming this was just a quick Replace Field Contents from the menu. But it’s also worth noting that the Replace Field Contents script step can now be transactional, with the new Open/Revert/Commit Transaction script steps. That makes RFC less scary/problematic to use in scripts!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.