Skip to content

scriptFilter

scriptFilter can be used in then chains. The previous menu action passes the value object in a JavaScript-Function. In the JavaScript-Function filters can be activated. The action values are:

actionValues
clear() (optional) clears all filter
js A JavaScript-Function to analyze the value of the scan and set filter.

The function got the following parameters:

property description
value The passed object of the previous menu action.
userData he user profile of the logged in user

Functions to add filters:

function description
eqFilter(name, value)
notEqFilter(name, value)
likeFilter(name, value)
gtFilter(name, value)
gteFilter(name, value)
ltFilter(name, value)
lteFilter(name, value)
isNotNullFilter(name, value)
isNullFilter(name, value)
{
    "label": "NFC Filter",
    "icon": "icon-broadcast",
    "action": "nfcRead",
    "then": {
        "action": "scriptFilter",
        "actionValues": [
            {
                "clear": true,
                "js": "var desc = value.payload.text.split('|')[1]; eqFilter('DESCRIPTION', desc)"
            }
        ]
    }
}