## Overview

Unqork logic components let you use formulas in your configuration. Components that support formulas are the Calculator, Initializer, and Data Workflow components. You can enter formulas into the Output table of the Calculator and Initializer components. Using formulas in the Data Workflow operator depends on the operators you configure. For example, the Formula operator supports formula configuration.

Below is a list of Hot-Formula-Parser, Lodash, Moment.js, and VBA (Visual Basic for Applications) formulas.

## Hot-Formula-Parser Formulas

The following formulas only exist in the hot-formula-parser library. They are not based on any Excel or VBA formulas.

TIP  To learn more about the hot-formula-parser library, see the following documentation: https://www.npmjs.com/package/hot-formula-parser

Formula Description Syntax Reference

Combines specified values and returns a new value.

ARGS2ARRAY

Creates an array from individual fields or an object. This formula is useful for converting an object to a single-row table in a Data Workflow.

ARGS2ARRAY(value1, [value2], ...)

COUNTIN

Counts how many times a specified value exists in an array.

COUNTIN(array, value)

COUNTUNIQUE

Counts the number of unique values in a list of specified values and ranges.

COUNTUNIQUE(value1, [value2], ...)

DIVIDE

Divides one value by another value and returns the result.

DIVIDE(number1, number2)

E

Returns Euler's number (e). This value is approximately 2.71828.

E()

EQ

Determines whether a value is equal to the specified value.

EQ(value1, value2)

FLATTEN

Flattens a nested array.

FLATTEN(array1, [array2], ...)

GTE

Determines whether a number is greater than or equal to another number.

GTE(number1, number2)

HTML2TEXT

HTML2TEXT(value)

INTERVAL

Specifies the intervals on the horizontal axis of a chart.

INTERVAL(second)

ISBINARY

Returns true if the value is a binary type.

ISBINARY(value)

LT

Determines whether a value is less than the specified value.

LT(number1, number2)

LTE

Determines whether a value is less than or equal to the specified value.

LTE(number1, number2)

MINUS

Subtracts one or more values from the specified value.

MINUS(number1, number2)

MULTIPLY

Multiplies two values and returns the result.

MULTIPLY(number1, number2)

NE

Determines whether a value is not equal to the specified value.

NE(value1, value2)

NUMBERS

Filters numbers from an array.

NUMBERS(value1, [value2], ...)

POW

Raises a number to the base power and returns the result.

POW(base, exponent)

REFERENCE

References to a specific cell at a fixed row and column.

REFERENCE(context, reference)

REGEXEXTRACT

Extracts matching text strings based on a regular expression.

REGEXEXTRACT(text, regex_pattern, [re_flags]) REGEXEXTRACT Function

REGEXMATCH

Determines whether part of a text string matches a regular expression.

REGEXMATCH(text, regex_pattern, [full], [re_flags]) REGEXMATCH Function

REGEXREPLACE

Replaces part of a text string with a different text string.

REGEXREPLACE(text, regex_pattern, replacement, [re_flags]) Regex in Unqork

VARS

Estimates variance based on a sample.

VARS(value1, [value2], ...)

## Lodash Formulas

Formula Description Syntax Reference

LODASH

JavaScript JavaScript is an object-oriented computer programming language. It is most-commonly used for interactive effects in the browser. library containing utility functions for programming.

LODASH(method, arg1, [arg2], ...) Using Lodash in Unqork Lodash Documentation

## Moment.js Formulas

Formula Description Syntax Reference

MOMENT

JavaScript JavaScript is an object-oriented computer programming language. It is most-commonly used for interactive effects in the browser. date library for parsing, validating, formatting, and manipulating dates.

MOMENT(moment_obj, method, arg1, [arg2], ...) Manipulating Dates With Moment.js Moment.js Documentation

## VBA (Visual Basic for Applications) Formulas

Formula Description Syntax Reference

JOIN

Joins elements separated by a delimiter.

JOIN(array, delimiter) JOIN Function

RIGHT

Extracts a given number of characters from the right side of a text string.

RIGHT(text, number) RIGHT Function

SPLIT

Divides text by a specified number of characters or string, adding each part to a separate cell.

SPLIT(text, index) SPLIT Function