What are your top 10 scripts? [XPOST]

What are your top 10 scripts?

Definition: The top 10 scripts are the top 10 Scripts showing in the scripts menu.

These top 10 scripts should “first do no harm” as they can be accidentally called from keyboard shortcuts.

Your top 10 scripts can include scripts that do something useful (and safe), or do nothing, for example: Script #08 with 0 steps.

You might add some blank scripts to fill up the top 10 spots. If someone later adds a potentially damaging script, it will likely show up below the top 10, will not have a keyboard shortcut, and will be harder to call accidentally.

Better yet, you can make your top 10 scripts useful…

Here are some of the ones that we like:

  1. Go to MainMenu (System Wide Home Screen/Dashboard)
  2. Go to Detail View (goes to Detail view for the table that you are on)
  3. Go to List View (goes to List view for the table that you are on)
  4. Varies
  5. Varies
  6. Varies
  7. Varies
  8. Varies
  9. Varies
  10. Help Request (keyboard shortcut is a mnemonic for “call the operator")

What are your favorite scripts to include in the top 10?

Mean script steps?

Scripts. Let us see if this image (from an old file) uploads…

image

I do not like having scripts shown from the scripts menu.

I kind of like the idea of having 10 placeholders so if someone adds a new script, it does not show, but that also means the users are exposed to those 10 values and will be asking about ‘What are those for?’. I don’t like having to tell my users to look elsewhere on their screen.

All in all, I guess my favorite solution is to use custom menus to remove the script menu altogether. Once you are using custom menus, it’s easy to put any scripts you want and organise them in submenus and put them where they are relevant (vs a list of 1-10 items), with the added benefit of being able to define custom keyboard shortcuts + being able to install/remove each of them with whatever calculation I can come up with as ‘install when’ condition.

4 Likes

Interesting idea. The Scripts menu is one of the FMP UI features that I really needs an upgrade.

The first thing is that we should be able to toggle it on/off completely from the Scripts dialog. If we don’t want to present scripts, there’s no need for the menu item to be there. And as we already have custom menus, the toggle would really be a UI shortcut that saves us having to define a custom menu set.

The next thing is that we should be able to control the display order, separators and folder nesting in the Script menu in a completely separate dialog from the one we use currently. The existing script dialog allows us as developer to arrange our scripts into sensible groups. The grouping that we set up in the back end for development reflects our needs - not the user’s needs. If we are going to expose scripts in the Scripts menu, that menu needs to be arranged for the users. The one dialog cannot do both jobs.

The only solution that I’ve found for this problem is to create a folder which stores scripts which are named for Users. Each of these scripts is simply a wrapper that calls “Perform Script” and passes the parameters on. It’s not too much effort but I consider it to be a nasty hack that requires a lot of maintenance.

1 Like

For office users, all scripts they can call are on buttons. This gives control over the context in which a script is available.

5 Likes

same here. Users don’t get access to the “Scripts” menu. I have a Logo on top/left of every layout with a script that
If [ Abs(Get(SystemPlatform)) = 2 ] // in order to deal with the FM SingleDeviceInterface with PC
Show/Hide Menubar [ Lock: Off ; Toggle ]
Adjust Window [ Resize to Fit ]
End If
If [ Get(AccountPrivilegeSetName) = “[Full Access]” ]
Install Menu Set [ “[Standard FileMaker Menus]” ; Use as file default: Off ] // the developers Privileges
Show/Hide Toolbars [ Show ]
End If

If I want the users to have access to the layouts menu, I'll do something similar: create blank layouts named the way they expect, each with a script trigger that redirects where it needs to (other layout, report, ...)

2 Likes

For the end-user there is no script - not at all - never - its irrelevant.

4 Likes

same here. Sometimes, we got a ‘Home’ function and a ‘Show status-bar’ unter the ‘shortcuts’ - but we rarely use those 10s in our solutions in general

edit: Wrote this a couple of hours ago, but forgot to save…

This is a fun question. It’s one of the few things in FM I’m somewhat dogmatic about:
02%20AM

4 Likes

Good point about context. All Scripts that are run from the Scripts Menu should run from any context. Get ( LayoutTableName ) is very helpful with that.

1 Like

Only visible to developers, though…

Actually I leave it for both.
It hamstrings its usefulness if, as a developer, I can only re-login as a user and then to get back to developer mode I have to close the whole file and reopen.

I suppose you could conditionally install it just for your developer-only test accounts for each privilege, but I’m not sure what the risk is by leaving it.

A user who is making multiple attempts to log in can do so more easily. However, the same user could close and reopen the file continuously - less convenient but the same result - so I don’t think that you are changing the risk.

1 Like

Once you move to v17 or above, it's even less risk, because you get locked out after 5 failed attempts.

3 Likes

I prefer to put the navigation into the scripts menu in order to navigate via keyboard shortcuts.

2 Likes

But your capture is not from the native script menu. So you are using a custom menu. You choose to have shortcuts mapped from 0-9. It’s not imposed on you by the menu and if you had fewer items and someone added a script, it would not risk being displayed in this menu. That’s basically why I like custom menus when compared with the native scripts menu.

1 Like

I try to instruct my clients to use the keyboard and not always the mouse, so I use the 1 … 0 menu individually #1 always leads to a starting layout.

Custom Menus are very useful, especially since FileMaker 17 when you can copy and paste them.

Worth noting that Custom Menus do not work in Web Direct, while top 10 Scripts do (although they seem to lose keyboard shortcuts?)

Both feature are useful, depending on what you are building and how much time you have to set things up.

3 Likes