Product Documentation
  • 👋Welcome to K3 Labs
  • Getting Started
    • Quick Start Guide
  • Automate
    • How to create a Workflow
    • Design Page: Key Sections
    • Trigger Set Up
      • Scheduled / Manual Trigger
      • Smart Contract-based Trigger
        • Token Smart Contracts Trigger Examples
        • Swap/Staking Smart Contracts Examples
        • NFT Collection Smart Contracts Examples
      • Wallet event-based
    • Functions Overview
      • Details on Read functions datapoints
      • Transform Function Details
        • Transform Custom Formula
      • JSON Data Preview
      • Custom Inputs
    • What are Actions?
  • Deploy
    • Deploy Page
    • Project Creation
  • Integrations
    • Coinbase
    • Slack
    • Telegram
    • Cubist Wallet
    • Safe Wallet
    • Hyperliquid
  • Stellar Blockchain
  • Tech Documentation
    • K3 Framework
      • Abstract
      • K3 Consensus
    • Networks & Usage
    • K3 Wasm
      • K3 Wasm Rust SDK
      • K3 Wasm Internal Specifications
    • Operator onboarding
Powered by GitBook
On this page
  1. Automate
  2. Functions Overview

Transform Function Details

PreviousDetails on Read functions datapointsNextTransform Custom Formula

Last updated 1 month ago

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:

  1. Field Selector: Allows users to select fields for formula creation, similar to the IF function.

  2. 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:

  1. Math Operations

    1. Custom Formula: Allows for custom formulas. See more .

    2. Abs: Returns the absolute value.

    3. Average: Calculates the average of a set of numbers.

    4. Floor: Rounds a number down to the nearest integer.

    5. Median: Finds the median value in a set of numbers.

    6. Mod: Returns the remainder from a division.

    7. Rand: Generates a random number.

    8. Min: Returns the smallest value from a set of inputs.

    9. Max: Returns the largest value from a set of inputs.

    10. Power: Raises x to the power of y (i.e., computes x^y).

    11. Percentage Change: Calculates the percentage change from a to b, using the formula ((b - a) / a) * 100.

  2. String Functions

    1. Length: Returns the length of a string.

    2. LowerCase: Converts text to lowercase.

    3. UpperCase: Converts text to uppercase.

    4. REGEX_Replace: Replaces a substring using regular expressions.

    5. Replace: Replaces occurrences of a string with another string.

    6. Substring: Extracts a portion of a string.

    7. Trim: Removes leading and trailing spaces.

    8. TrimLeft: Removes spaces from the beginning of a string.

    9. TrimRight: Removes spaces from the end of a string.

here