Recalculate Field

Is there a simple way to run Menu item Field > Morph > Recalculate Field ? I just need to do it on the fly from time to time. Is there a button I can drag to the menu bar, or can I assign a keystroke in Panorama, without using Quickeys or Applescript? I have been reading all the wonderful stuff on Morphing, but what I need is just a generic trigger for Recalculate Field.

That should be Keyboard Maestro, not Quickeys. Actually, I went ahead and did a macro to trigger Recalculate Field, but may prefer to run inside Panorama.

Make a HotKey with the recalculatefield statement. I made a sample using option-R but you could use any key combination you like that doesn’t muck with an existing one.

definehotkeys "Global", "OPTION-R", {recalculatefield}

Thanks, gary! Rhetorical question: why didn’t I know about definehotkeys? I just searched the manual for “recalculate” and got no hits.

Did you include the quotes in your search? You need to leave them out. RecalculateField is definitely in the documentation.

However, that page isn’t going to tell you about definehotkeys, nor should it. DefineHotKeys is a general tool for assigning a hot key to arbitrary code – recalculating is only one of a thousand possible things that could be done with this.

If you are mostly working with a single database, or a small of databases, I think there might be a more straightforward way to set up a keystroke for this operation. Just set up a procedure in your database and assign a keyboard equivalent, like this:

With this setup, pressing Command-Option-R will recalculate. This command will also appear in the Action menu.

No, I searched for recalculate and for recalculate field. Not recalculatefield. I have now.

Cheers, Stan

When you check the “Full Text Search” Box, you’ll find all variations.

If you search for recalculate you will find recalculatefield. In this case, it is not necessary to check the Full Text Search box. But that is always a good next step to try if at first you don’t find what you are looking for.

That’s interesting. My experience is there is a tiny field for a search and a larger field below that never displays anything. Looks like this. What am I missing? Screen Shot 2020-02-29 at 5.26.42 PM

Actually “recalculate field” is in the search field, but you can’t see the “field” and that is what I searched for. Now, if I search ONLY for “recalculate” I get this, which would have been more useful if I’d only known the error of my ways:
Screen Shot 2020-02-29 at 5.29.04 PM

The oddity to me is that the “Full Text Search” and the arrow and the box suggest I could type in there and do a, well, Full Text Search. But that isn’t what that box is. The only place to type in a search, in my experience is in the tiny field above the box. Perhaps that could be re-iimagined to be more useful for searches by people who don’t already know what exactly to search for, and have yet to figure out the structure of the search field, the box, the arrow and the other arrow.

But that is why I didn’t find the help on “recalculatefield” – I didn’t think to search for that term nor limit my search to “recalculate”.

This might help: the documentation of the Panorama X documentation. :wink:

When searching, a good rule of thumb is ‘less is more’. If you are overwhelmed with possibilities, then add additional criteria, but do start with less (almost always.)

A nice advantage of Hotkeys is that they will be triggered from any open database, as opposed to the procedure key which would presumably be only for that database/procedure.

HotKeys can be set up to be global for use across all databases, database for use only in the database they are created in or window to only work in the window that was frontmost when they were created. If no scope is indicated it will default to database.

1 Like

The function of this box is described in the section “Transferring Help Information to your Project” on this page. You can drag on the gray arrow to drag the text of the statement or function into another window, for example a procedure window.