Context and named tables
Every function in this family, with its signature and examples. Each example runs as a test of the language. See Language basics for how calls, types, and operators work.
context
Returns the formula context, one object for the whole node: it starts empty in the node's first statement and keeps every value set before, across the node's calls. Read it with .prop and write it with .setProp; context(name) is context().prop(name).
context()
context(name)
Operation formulas only.
context().prop("highestPrice"): The highestPrice context valuecontext("highestPrice"): The same value, in the short form
inputs
Returns the node's named tables: one per wire into it, plus each table a call defined earlier in the node; .prop(handle) is the table named handle, and inputs(handle) is inputs().prop(handle).
inputs()
inputs(handle)
Operation formulas only.
inputs().prop("ibor_valuations"): The ibor_valuations tableinputs("ibor_valuations"): The same table, in the short form
rowIndex
Returns the current row's zero-based position in the row array entering the statement. Inside a list callback or an each() body index is still the item's position and rowIndex() is still the row's.
rowIndex()
Operation formulas only.
setProp("n", rowIndex() + 1): Every row numbered from 1 in arrival ordersetProp("b", inputs().prop("b").rows().at(rowIndex()).prop("value")): Each row merged with the table row in the same position; empty past the end of the table
input
Returns the node's own incoming rows as a table; .rows() is every row in table order. A node condition reads its incoming dataset through it.
input()
Operation formulas only.
input().rows().some(current.prop("SIDE").test("BUY")): true when any incoming row has SIDE BUYinput().rows().count() > 0: true when the node has incoming rows
prop
Returns a field of the current row, of a table row, a context value, or a named table by its handle.
prop(name)
row.prop(name)
context().prop(name)
inputs().prop(handle)
Also callable as receiver.prop(…), with the receiver as the first argument.
prop("price") * 2: Twice the row's priceinputs().prop("ibor_valuations").find("ISIN", prop("ISIN")).prop("value"): value of the first ibor_valuations row whose ISIN matches; empty on a miss
getProp
Returns a field of the current row or of a table row; the same read as prop.
getProp(name)
row.getProp(name)
Also callable as receiver.getProp(…), with the receiver as the first argument.
getProp("price"): The row's price
find
On a named table, returns the first row in table order whose column equals the value under ==, or empty when none matches.
table.find(column, value)
Also callable as receiver.find(…), with the receiver as the first argument. Operation formulas only.
inputs().prop("ibor_valuations").find("ISIN", prop("ISIN")): The first ibor_valuations row whose ISIN matches; empty on a miss
findAll
On a named table, returns every row in table order whose column equals the value under ==.
table.findAll(column, value)
Also callable as receiver.findAll(…), with the receiver as the first argument. Operation formulas only.
inputs().prop("ibor_valuations").findAll("ISIN", prop("ISIN")).map(current.prop("value")).sum(): Sum of value over every matching ibor_valuations row
rows
On a named table, returns every row in table order.
table.rows()
Also callable as receiver.rows(…), with the receiver as the first argument. Operation formulas only.
inputs().prop("ibor_valuations").rows().count(): Number of rows in the ibor_valuations table
exceptions
In a node condition, returns the exceptions raised in this build anywhere upstream of a table's wire (the node wired in and every node before it, each counted once), counted by severity: .prop("info") (levels 1 and 2), .prop("warning") (level 3) and .prop("error") (levels 4 and 5). On input() the counts cover everything upstream of the node, through every wire.
table.exceptions()
Also callable as receiver.exceptions(…), with the receiver as the first argument. Operation formulas only.
input().exceptions().prop("warning") == 0 and input().exceptions().prop("error") == 0: true when nothing upstream of the node raised a warning or error exceptioninputs().prop("trades").exceptions().prop("error") == 0: true when nothing upstream of the trades wire raised an error exception