Functions and Operators

Nektion has a slew of built-in functions and operators to make building formulae as easy as possible. Below is a table detailing how to use the functions and how they work.

Click here to view the operators or alternatively, scroll to the bottom of the page.

Nektion functions

FILTER
CategoryNameReturnsUsageDescription
LogicIFIF(condition, thenExpression, elseExpression)Executes different expressions depending on the truth value of the condition.
LogicANDBooleanAND(arg...)Returns true if all arguments evaluate to true
LogicORBooleanOR(arg...)Returns true if any of the arguments evaluate to true
LogicNOTBooleanNOT(arg)Returns true if the argument is false, and vice versa.
Logic, SortingASCItemsASC(args, criterion)Returns the arguments sorted by the criterion in ascending order
Logic, SortingDESCItemsDESC(args, criterion)Returns the arguments sorted by the criterion in descending order
Date and timeTIMESTAMPTimestampTIMESTAMP(timestring)Parses the time value of a string and returns the equivalent Unix timestamp.
Date and timeNOWTimestampNOW()Returns the current time as timestamp. The timestamp is refreshed every 15 minutes.
Date and timeATTIMEATTIME(timestamp, formula)Evaluates the formula at the given timestamp. This can be used to calculate historical metrics and as a results calculate how metrics have changed.
Date and timeASDATESTRINGDateASDATESTRING(date, [format])Parses the date parameter and formats it with the optional format parameter (default format is 'YYY-MM-DD). The date parameter can be a timestamp, a date or a string representation of a date.
GraphNODEGraphNODE()
GraphPAGEGraphPAGE()
GraphROWGraphROW()Reference to the current row item (for cards in a board view)
GraphITEMGraphITEM()Reference to the current item. Generally used to reference the current item while filtering graphs.
GraphVIEWGraphVIEW()Returns the current view item (e.g. Tree, Board). Generally used in creating custom local filters.
GraphCOLUMNGraphCOLUMN()Returns reference to the current column item (for cards in a board view).
GraphVIEWITEMSGraphVIEWITEMS()Returns the items in the current view (e.g. items in a tree)
Date and timeFIRSTLINKEDTimestampFIRSTLINKED(relationtype, items)Returns the earliest date at which a specific relation was created.
Date and timeLASTLINKEDTimestampLASTLINKED(relationtype, items)Returns the latest date at which a specific relation was created.
Date and timeTIMELINKEDTIMELINKED(relationtype, items)How long (in seconds) current item has been linked with specific relation type(s) or contexts to any of the items given as parameters.
MathMAXIntegerMAX(arg...)Returns the largest number among its arguments.
MathMINIntegerMIN(arg...)Returns the smallest number among its arguments.
MathCOUNTNumberCOUNT(items...)Returns the number of items passing through the filter
LogicFUSEFUSE(formula...)Returns the first value of the first parameter that is defined. Useful for backup logic, e.g. to use the actual start date for items, and estimated date if item is not started.
LogicISEMPTYBooleanISEMPTY(formula)Returns true if the parameter returns an empty result or nothing, otherwise returns false.
GraphFLATTENListFLATTEN(tree)Flatten a graph into a one-dimensional result set. Consider flattening a graph with the _| operator
GraphUNIONGraphUNION(graph...)Returns a flattened graph of items from all of the graph supplied as parameters.
GraphINTERSECTIONGraphINTERSECTION(graph...)Returns a flattened graph of items that appear in every graph supplied as a parameter.
GraphFILTERGraphFILTER(formula, criterion)Same as | operator. Used for filtering graphs
LogicISADMINBooleanISADMIN()Returns true if the logged-in user is an admin. Might be used for example in hidden fields for widgets.
LogicISITEMBooleanISITEM(arg...)Returns true if current item, as retrieved with ITEM() function, is any of the items given as parameters
Date and timeATNOWATNOW(formula)Returns the value of the formula at current time. Used mainly in time series to get up to date configuration data when time series values are evaluated over time.
GraphWITHALLITEMSWITHALLITEMS(formula)Returns the value of the formula without filtering out template and other admin items.
GraphRANKRANK(formula, contextformula)Rank the graph returned from formula with the rank context returned by rank context formula.
GraphREFERENCESTOGraphREFERENCESTO(reference)Returns all items that have a formula field that references the parameter
LogicISLINKEDBooleanISLINKED(typeCriterion, criterion)returns true if the current item has a relation that matches the arguments
LogicTYPEBooleanTYPE(itemtype...)Returns true if the current item's type matches one of the arguments.
LogicHASRANKBooleanHASRANK(contextformula)Returns true if the current item has a rank in the context provided by the formula given as parameter. Generally used when having a rank is used to mark is an item is prioritized in certain context.
LogicISLINKINGBooleanISLINKING(relationtypes,targetitems)Returns true if the item is currently being linked to any of the target items with any of the listed relation types. This is generally used to determine that you can create or move something to a view, but after creation or move the items are not shown in that view.
LogicISROOTBooleanISROOT()Returns true if the current node is a root of the graph
LogicISCOLUMNBooleanISCOLUMN()Returns true if the current node is the current column item
LogicISROWBooleanISROW()Returns true if the current node is the current row item
LogicISPAGEBooleanISPAGE()Returns true if the current item is the same as the page item
GraphITEMSGraphITEMS(item...)Returns a flat graph containing the specified items.
GraphITEMSOFTYPEGraphITEMSOFTYPE(itemtype...)Returns a graph containing all of the items of the specified item types.
GraphHOPHOP(root, relationtypes)Same as -> operator
-VAL*VAL(item)Returns the value of the item, for example a date field associated with a parent item.
MathROUNDNumberROUND(value, precision)Rounds the given value to the chosen number of decimals.
GraphUSERUSER()Returns the user item for the currently logged in user. Generally used for restricting the visibility of some fields to members of some groups, or in options to suggest the current user as responsible etc.
JOINAStringJOINA(graph, field, [delimiter])Returns a comma (or the optional delimiter) separated string of values of items in the graph.

Nektion operators

FILTER
OperatorDescriptionUsageExample
->>Expand forward (graph)startgraph ->> relationNODE() ->> "Project has sprints":1235
<<-Expand backward (graph)startgraph <<- relationNODE() <<- "Project has sprints":1235
->Hop forward (graph)startgraph -> relationNODE() -> "User has stories":1532
<-Hop backward (graph)startgraph <- relationNODE() <- "User has stories":1532
|Filter items.graph | filterNODE() | TYPE("Story":7676)
_|Flatten a graph and then filter it. Equivalent to combining FLATTEN() and |.graph _| filterNODE() ->> "Project has sprints":1235 & "Sprint has stories":5424 _| TYPE( "Sprint":6655, "Story":7676 )
=Equals (numeric)value1 = value2ITEMSOFTYPE("Story") | ( VAL("Priority") = 3 )
>=Greater than or equals (numeric)value1 >= value2NODE() | NOW() >= TIMESTAMP("2021-06-23") )
<=Less than or equals (numeric)value1 <= value2NODE() &<- "User has stories":1532 | ( VAL("Start date":110) <= TIMESTAMP("2021-06-23") )
>Greater than (numeric)value1 > value2NODE() | NOW() > TIMESTAMP("2021-06-23") )
<Less than (numeric)value1 < value2NODE() &<- "User has stories":1532 | ( VAL("Start date":110) < TIMESTAMP("2021-06-23") )
&Strings: concatenate Graphs: combine relation typesstring1 & string2 graph -> relation1 & relation2 & relation3 "User has stories":1532 & "Story has details":12931">"Due date: " & VAL("Due date":111) NODE() -> "User has stories":1532 & "Story has details":12931
+Additionvalue1 + value2NODE() <- "User has stories":1532 | ( VAL("Start date":110) < TIMESTAMP("2021-06-23") + DAYS(100) )
-Subtractionvalue1 - value2NODE() <- "User has stories":1532 | ( VAL("Start date":110) < TIMESTAMP("2021-06-23") - DAYS(100) )