Product and version (e.g. FileMaker Pro 14.0.3) Filemaker Pro Advanced 22.214.171.124
OS and version MacOS 10.11.6
Browser and version (for WebDirect only)
Hardware Mac Pro
Description When specifying a script action for a custom menu item, you cannot specify a script local to the database you're editing menu items for.
How to replicate
1. You will need two databases, not related to each other; I will call them DB1 and DB2. Both already have custom menu sets configured, and plenty of fields, scripts, layouts, etc.
2. Open both databases, and open Script Workspace for DB1. (So you have three windows open, DB1, DB2, and Script Workspace DB1)
3. Select (click on) the DB2 window, making it frontmost.
4. Select (click on) the Script Workspace DB1 window, making it frontmost.
5. Go to Tools-->Custom Menus-->Manage Custom Menus...
6. Click on the Custom Menus button, and pick one to Edit.
7. Click Create (to add a new menu item).
8. Tick the box for "Action (Perform script)"
9. In the Specify Script Step dialog, click where it says "<unknown>" to specify the script for the menu item to perform.
10. Observe that the dropdown at the top says Current File (DB2), and the scripts listed are from that database, not the actual current database, DB1.
NB: If DB1 and DB2 are related, DB1 will be selectable from the dropdown at step 10. However, if you select DB1 and choose one of its scripts, the resulting Perform Script step will read "<unknown> from file: "" (file not open)", even though of course DB1 is open.
Workaround (if any)
At step 4, click on the DB1 window instead of the Script Workspace DB1 window.