Shortcuts

Shortcuts are a series of steps all grouped together into one menu item. They can be seen as similar to Excel macros.

Editing a shortcut is analogous to editing a function.

Note

It is suggested that shortcuts are thoroughly tested prior to use in a Production environment. A shortcut can have a destructive effect on a NEXUS database if not tested properly.

The Configuration > Shortcuts window lists all shortcuts in the database and displays a visual preview of the components making up the selected shortcut. Here you can use the toolbar options listed under Toolbar, including adding or editing shortcuts.

Refer to Shortcuts - Worked Examples for a step-by-step guide on configuring Shortcuts.

_images/configuration.general.shortcuts.png

Toolbar

  • Add, Edit, Delete:
    Add / Edit / Delete Shortcut(s).
  • Export
    See Export for full description of the Export menu item.
  • Customise
    See Customise for full description of the Customise menu item.
  • Connections
    See Connections for information about the Connections toolbar option.
  • Load Template
    Loads a previously saved .shortcut template. Note that if the previously saved Shortcut still exists in this database, Load Template will overwrite that existing Shortcut — it will not create a new copy of it. Similarly with any other elements saved in the template file: asset information fields, functions, etc.
  • Save Template
    Saves this Shortcut and related details to a .shortcut file. NEXUS IC will find all items related to this Shortcut (functions, asset information forms, event definitions, chart templates, lookup tables, etc), and will present a dialog listing all the dependencies it’s found, with a checkbox for each row. Untick any that you don’t want saved with your Shortcut.

Shortcut Categories

Shortcuts can be put into categories. If a shortcut’s category matches the name of an existing button menu, then the shortcut menu item will be placed in that menu. For example, if a shortcut is placed in a category called Assets, then on the Assets screen this shortcut will be placed under the Assets menu button on the toolbar. The Inspection screen also has an Assets menu button, so the shortcut would also be placed under the Assets menu on that screen. If the shortcut was instead placed in a category called Asset Views, then on the Assets screen it would be placed under the Asset Views menu button. The Inspections screen has no such menu button, so instead it would be placed under a menu button called Shortcuts.

Shortcuts do show when appropriate on other panels within a screen — for example, shortcuts that act on an asset will appear on the Children panel on the Assets screen. But shortcuts will not appear on “Picker” dialogs that work on that type — so if you edit a drawing layer and pick an asset for that layer, you won’t see shortcuts.

Shortcut Description

The shortcut description is a text field that stores a summary of what the function does and how it may be used.

Shortcut Elements

The shortcut editor contains two types of elements - Actions and Inputs.

These two items are very similar as some inputs may perform an action and some actions may be able to act as an input, but they are categorised and displayed based in the editor based on what their ‘primary’ purpose is.

Actions

Name Description
Function This action executes a NEXUS function, the output of the function can be used as an input into another element.
Update Row This action is used to update a row in a Business Object
Insert Row This action is used to create a new row in a Business Object
Concatenate String This action builds a string using a set of inputs and the result can then be used as an input into another element.
Set Value This action sets the value of a variable.
Email This action generates an email.

An Action can have Inputs and outputs. Actions appear in the white centre part of the Shortcut configuration window.

The “Update Row” action can be used to show a dialog to the user, by setting the action’s Style to “Allow User to Edit”.

Inputs

Input Row This forms the basis of where a shortcut exists and is triggered.
Variable Holds temporary information within the shortcut, used as an input to an action.
Constant A constant value, used as an input to an action.

Inputs can have an Action. Inputs appear in the grey section on the right-hand side.

An Input’s “From” determines when the shortcut will be available: if the From is set to “On Add” then the shortcut will run every time a row is added to the selected Object (i.e. database table). Similarly with On Edit and On Delete. (In these three cases the shortcut will only execute when the row is added/edited/deleted by our software, be it NEXUS IC, IC-Inspection or the REST service used by IC-Web, IC-Inspector and third parties.) If the From is set to Retrieve Focused Item, the shortcut will appear as a menu option on grids for the relevant Object — e.g. if the Object is the Anomaly table, your shortcut would appear as a menu item on the toolbar above the Anomaly table on the Anomalies screen and on the Assets screen and on any dialog where the user is selecting an anomaly. If the From is set to Prompt User to select Row, then when the shortcut runs, the user will be shown a picker dialog on the appropriate database table. If the From is set to Prompt User to select one or more Row(s), then when the shortcut runs, the user will be shown a picker dialog on the appropriate database table from which they can select one or multiple rows. The entire shortcut will then be run on each row.

The Name you set for your input may be visible as title text on a user selection dialog.

To get your new or edited shortcuts to refresh, you will need to close and re-open your database.

Enabling/Disabling a Shortcut

When a shortcut is created, it will not be available (not seen on menu) until it is enabled via the Enabled checkbox under Edit Shortcut. Once enabled, the shortcut will be visible in the Shortcuts dropdown menu. Enabling or disabling a shortcut requires closing and reopening the database for changes to take effect.

Multi-select

You can have multi-selected rows feeding into your shortcut, so the user can select several items in a grid and then run your shortcut. But user selection dialogs launched within the shortcut are single-select. If the user multi-selects and runs a shortcut that has a selection dialog, an Apply to All checkbox will appear at the bottom left of the selection dialog. If the user ticks this box, their selection will apply to all (remaining) runs of the shortcut. If they don’t, their selection will be used for this run, and the selection dialog will be shown again for the next run.

Within an input, the “From” option of “Retrieve Focused Item” is inherently multi-select: your shortcut actually gets run once for each selected item.