match lines for document

This block is part of the array group and was last modified in core v14.0.2.

match lines for document v14.0.2

Returns all matching lines by guid for the given document. The input should contain a _meta.guid which will be returned and an array matches containing { key, value }.

In pins 4
  • lines required
    array

    lines to match. Example: [{ "_meta": { "guid": "example" }, "matches": [{ "key": "code", "value": "test" }] }]

  • overwrites required
    object

    overwrite lines by guid. Example: { "example": [{ "_meta": { "guid": "example_overwrite" }, "matches": [{ "key": "code", "value": "test2" }] }] }

  • document required
    object

    the document to match with. Example: { "_meta": { "guid": "example" }, "code": "test" }

  • only check prefix
    value

    If set will only check the given match prefix and return true for all other matches

Out pins 1
  • matches
    array

Outputs the _meta.guid strings of matching lines, NOT the line objects. A line matches when every entry in its matches list holds against the document: the value is split on whitespace and ANY token may equal the document field (string compare; array fields match on any element), value "*" always passes, and with prefixcheck set entries whose key lacks the prefix are skipped. If overwrites contains the line guid, a matching overwrite line contributes its OWN guid instead.

A typical wiring for match lines for document: with values feeds the lines pin; new object feeds the overwrites pin; new object feeds the document pin; the matches out pin feeds length.

Studio canvas example for the match lines for document block: typical wiring for match lines for document.

Version history

Introduced in v14.0.2.


Back to array Return to the main group to view all sub-groups Back to array Return to the group to view all blocks within this group