Shortcut

The Shortcut Module helps to avoid fat finger issues and to speed up data entry for numeric columns.

Defining a Shortcut

A Shortcut defines which mathematical calculation is applied to the currently edited (numeric) cell when a given key is pressed.

PropertyDescription
ScopeOn which numeric Columns the Rule is applied
ShortcutKeyKey which triggers the Shortcut when pressed
ShortcutOperationThe Operation: 'Add', 'Subtract', 'Multiply', 'Divide'
ShortcutValueValue which acts as 2nd operand for ShortcutOperation (the first operand being the cell value)

As can be seen it comprises 4 elements:

Scope

Which numeric Columns will use the Shortcut.

tip

This can be set to be DataType of 'Numeric' so that it applies to all

Operation

The mathmatical operation to undertake. There are 4 potential values:

  • Add
  • Subtract
  • Multiply (the default)
  • Divide

Key

The key to use to trigger the Shortcut

note

This has to be a letter of the alphabet.

Value

The numeric value to use in the mathmetical operation when the shortcut is applied

Putting it together

Here we define 2 Shortcuts which will happen when a key is pressed in the numeric cell editor:

  • 'm' - for any numeric column - will multiply current edit value by 1000 (e.g. 5'm' produces 5,000)
  • 'v' - for the 'amount' column - will multiply current edit value by 1.175 (e.g. 100'v' produces 117.5)
const demoConfig: PredefinedConfig = {
Shortcut: {
Shortcuts: [
{
Scope: {
DataTypes: ['Number'],
},
ShortcutKey: 'm',
ShortcutValue: 1000,
ShortcutOperation: MathOperation.Multiply,
},
{
Scope: {
ColumnIds: ['amount'],
},
ShortcutKey: 'v',
ShortcutValue: 1.175,
ShortcutOperation: MathOperation.Multiply,
},
],
},
};

UI Elements

Shortcut includes the following UI Elements:

  • Popup - Shows a list of existing Shortcuts with a Delete button. Plus an Add button to start the Shortcut Wizard which facilitates the creation and editing of Shortcuts.

Entitlements

Shortcut Entitlement Rules:

  • Full: Everything is available to the User - they can create and edit Shortcuts

  • Hidden: Everything is hidden from the User

  • ReadOnly: Users can use pre-existing Shortcuts but not create or edit their own

FAQ

Can we apply shortcuts on non-numeric columns?

No, Shortcuts only work for numeric columns.

More Information