Transform Function Details
Overview
The Transform Function in K3 Labs is designed to enable users to manipulate and process data in workflows with a range of customizable options. Below, you can find a breakdown of how the function setup and key features work.
Setup Components:
Field Selector: Allows users to select fields for formula creation, similar to the IF function.
Variable Field: A variable selector allowing users to add input points into their formulas.
Note: One transform function can perform one action.
Formula Functions:
Upon selecting the formula option, users can choose from a drop-down menu with various mathematical, string, and array operations, categorized as follows:
Min/Max Functions
Min: Returns the smallest value from a set of inputs.
Max: Returns the largest value from a set of inputs.
Operations
Addition (+): Adds two or more values.
Subtraction (-): Subtracts one value from another.
Division (/): Divides one value by another.
Multiplication (*): Multiplies two or more values.
Math Functions
Abs: Returns the absolute value.
Average: Calculates the average of a set of numbers.
Floor: Rounds a number down to the nearest integer.
Median: Finds the median value in a set of numbers.
Mod: Returns the remainder from a division.
Rand: Generates a random number.
String Functions
Length: Returns the length of a string.
LowerCase: Converts text to lowercase.
UpperCase: Converts text to uppercase.
REGEX_Replace: Replaces a substring using regular expressions.
Replace: Replaces occurrences of a string with another string.
Substring: Extracts a portion of a string.
Trim: Removes leading and trailing spaces.
TrimLeft: Removes spaces from the beginning of a string.
TrimRight: Removes spaces from the end of a string.
Array Functions. Based on JavaScript array methods, allowing advanced operations on lists and data arrays.
Find: Returns the first element that meets a condition.
Every: Checks if all elements meet a condition.
Some: Checks if at least one element meets a condition.
FindIndex: Returns the index of the first element that satisfies the condition.
Flat: Flattens an array.
Filter: Filters elements based on a condition.
At: Returns the element at a specific index in the array.
Last updated