Recontextualise code with fmCheckMate

Recontextualise code with fmCheckMate

Same fields, different TO

Problem

Have you got some fields nicely arranged in a portal but you now need to have the same fields shown in a new list layout?

You can copy and paste the fields to the new list layout, but the problem is

  • you need to change the TO of every field to the LayoutTable / PTO
  • …and every calculation - conditional formatting condition, hide calculation, tip or placeholder calculation also needs to be changed?
  • …and every button script parameter also may need changing?

Bummer!

fmCheckMate

Solution using fmCheckMate

Use fmCheckMate to rename all the TO references in a quick process:

If your portal TO on the Company List layout is Company.Contacts and your Contacts List layout is based on the PTO _Contacts then try this:

  1. Go to the Company List layout and copy the fields in the Company.Contacts portal - C
  2. Open fmCheckMate and press the [Convert Clipboard] button, or press C (for Convert) or 2
  3. Type Company.Contacts (because the find field is already in focus) and press Tab or F
  4. Type _Contacts
  5. Either
    • replace all occurrences by clicking the [R] button or pressing A
    • convert back to FileMaker objects by clicking the [→ FM] button or pressing V or
    • just press V to replace and convert in one go
  6. Go to the Contacts List layout and paste the fields in. - V

Killer keys

CC • «find string» • Tab «replace string» • VV

Check your work / Prove you are right

If you have done it all right your fields should now be in the right context, and there should be no errors.

If you are not sure if there are errors, then copy the code back out of the layout and check it using fmCheckMate’s Layout Analysis function.

fmAutoMate

Alternative Solution using fmAutoMate

It is also possible to find and replace to recontextualise your code directly within FileMaker using fmAutoMate, which is a much more tightly integrated solution.

Made with ❤️ by MrWatson-de