I'm copying from the concept of Developer layouts here, scripts can generally use Developer layouts, but in my opinion there are some good reasons to create specific layouts for scripts when they have to access tables.
Benefits of Script layouts
- Ensure better performance: because Script layouts are limited to the Form view method they will never slow down solutions based on FileMaker 11 or earlier versions when scripts need to loop thru records.
- The Suppressible Triggered Scripts practice is hardly applicable in already existing big solutions, Script layouts are trigger-free to avoid interferences of triggers and scripts
- If you want, you can keep summary fields in Developer layouts without worry about affecting script performance
- In the header of Script layouts can be placed useful notes, like external scripts that may use the layout
- Especially when integrating AppleScript within a FileMaker solution, even a small modification to a layout (like removing a field from the layout, or enabling it just in find or browse mode) can break the AppleScript that uses it. A Script layout exists especially for scripts, so you are sure you are not going to alter it for any other reason, while you can continue to confidently improve the developer layouts as needed without the worry of breaking some script.
Following the standards outlined in Table occurrence naming for developer tables. This proposed best practice suggests you create a correspondingly named layout with the following features. Keep the names the same because a unified structure is easier to follow.
- Always hide the layout within the Manage Layouts dialog by unchecking it. (Don't allow it to be viewed)
- Use the color Cyan in the header as a visual reminder about the layout is a script layout.
- Identify external tables within the header by adding the file name (including .fp7)
- Limit the view method to Form in order to avoid performance issues with FileMaker version 11 and earlier
- Do not assign any trigger for Script layouts in order to avoid any interferences with scripts
- Instead of the @ prefix (used for Developer layouts) use another character (I like § that reminds me something like a gear and a stylized 'S' too) in order to distinguish Script layouts.