Plus Minus

The Plus / Minus Module enables the creation of Nudge Rules which react to the '+' or '-' keys being pressed in numeric cells.

tip

AdapTable allows you to use the + and - keys on the keyboard to increment or decrement the value of numerical cells in those columns which you have identified as having a nudge value.

Plus Minus Rules

The PlusMinusNudge defines whether a cell should increment / decrement and by how much.

It has these key characteristics:

Scope

Scope defines where the Plus Minus Rule is applied. Options are:

  • one (or more) Columns

  • all columns of 'Numeric' DataType

  • an entire Row (Scope of 'All')

Nudge Value

The Nudge Value specifies how much the cell in question will increment (when '+' is clicked) or decrement (when '-' is clicked).

Query

An optional Plus Minus Rule - using a Query - can be provided if the Nudge should run only under certain circumstances.

note

A Query can reference multiple columns and contain AND and OR and more advanced logic.

UI Elements

Plus/Minus includes the following UI Elements:

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

  • Column Menu - Numeric columns have a Create Plus Minus Rule Menu Item which starts the Plus / Minus wizard

Entitlements

  • Full: Everything is available to the User - they can create and edit Plus / Minus rules

  • Hidden: Everything is hidden from the User

  • ReadOnly: Users can use pre-existing Plus / Minus rules but not create or edit their own

Plus Minus Predefined Config

In Plus Minus Predefined Config it is possible to define multiple Plus Minus Rules.

export default {
PlusMinus: {
PlusMinusNudges: [
{
Scope: {
ColumnIds: ['bidOfferSpread'],
},
NudgeValue: 5,
},
{
Scope: {
DataTypes: ['Number'],
},
Rule: {
BooleanExpression: '[price] > 5000',
},
NudgeValue: 100,
},
],
},
} as PredefinedConfig;

In this example we create 2 Plus Minus Nudges:

  • on 'bidOfferSpread' column which will be nudge by 5

  • on all numeric columns which will be nudge by 100 if the 'price' column is over 5000

FAQ

Can I use Plus/Minus across multiple cells simultaneously?

Yes, so long as all the highlighted cells are in the same column. AdapTable will automatically apply the correct nudge value for each cell in the selection.

More Information