|  Developer
Updated on November 22, 2021

hasAtLeastOneDictionaryValue

  • This event arises every time when element is added or is updated in dictionary and value of this element is equal to value is set in this block. Dictionary could have several elements with same value.
Edit
Field Type Required Description
blockOptions.method.args.item string + Argument declaration of item ID. The value should be in block with name.
blockOptions.method.args.value string + Argument declaration of dictionary value. The value should be in block with name.
Edit
				
					{
    "blockId": "<ID>",
    "blockType": "when",
    "blockOptions": {
        "method": {
            "name": "hasAtLeastOneDictionaryValue",
            "args": {
                "item": "item",
                "value": "value"
            }
        }
    },
    "fields": [
        {
            "name": "item",
            "type": "item",
            "value": "5e4a5fef7f0000707ff6e9bd"
        },
        {
            "name": "value",
            "type": "token",
            "options": [
                {
                    "value": "low_battery",
                    "label": {
                        "lang_tag": "ui7_low_battery",
                        "text": "has low battery"
                    }
                },
                {
                    "value": "not_detected",
                    "label": {
                        "lang_tag": "ui7_sensor_not_detected",
                        "text": "is not detected"
                    }
                }
            ],
            "value": "low_battery"
        }
    ]
}