Skip to main content
A query’s script reads input and returns one value. It can call the fn: functions on this page and JEXL’s own built-ins, and nothing else: no method calls on values, no clock, no randomness, no network, so the same input always gives the same result. The script language comes from the moqui-jexl component, which Darpan runs from 3.4.0. Before 3.4.0 the prefix was d:.

What the script gets

  • input.<name>: the rows each input of the read returned, a list of maps. Dates arrive as ISO-8601 text, for example 2026-11-20T10:00:00Z.
  • input.run: date and timeZone of the run.
What a read may name is in Queries in the product docs.

The fn: functions

Built into JEXL

These need no fn: prefix, so there is no fn:len, fn:min or fn:count. Map keys are quoted: {'summary': 'x'}. A bare word is a variable. A list you add to starts as [...] and grows with fn:push; [] is a fixed, empty array.

What the script returns

Nothing (nothing is sent), a text or number (the summary), or:
At most 5 files, sent as CSV (UTF-8 with a byte order mark; a text cell that could start a spreadsheet formula gets a leading '). The summary is up to 4,000 characters. A map with other keys, or a list, is data: it comes back to the caller and is never sent.

Limits

Every query runs with the QUERY profile. A run stops with an error when it passes a limit; the error names the limit and, where there is one, the line.

Example

If input.findings is an audit’s findings read with recordKey, headline and firstFoundDate, this returns their count and a file: