Logic Composer Operations Catalog

Complete reference guide for all operations available in Proma's Logic Composer


Variables

System-generated data and current context information available in your logic flows.

Variable

Description

Common Use Cases

Created By

User who created the record

Track ownership, prevent self-assignment

Created At

Record creation timestamp

Calculate record age, sort by creation

Updated At

Last modification timestamp

Track changes, identify stale records

Logged In User

Currently authenticated user

Row-level security, personalized views

Current Date

Today's date

Calculate due dates, age calculations

Current Time

Current time

Timestamp operations

Current Datetime

Current date and time

Full timestamp operations

Current Nepali Date

Current Nepali calendar date

Localized operations


Input Nodes

Operation

Description

Example

Custom Input

Static or predefined values used as constants

Value: "API_KEY", Number: 100

Dynamic User Input

Captures user-provided data at runtime

Field: "email" → [email protected]


Text Operations

Operation

Description

Example

Formulate Text

Create strings with variables

"Hello {name}" → "Hello John"

Concatenate

Join multiple strings

"Hello" + " " + "World" → "Hello World"

Replace

Find and replace text

"Hello World" → "Hello Universe"

Uppercase

Convert to uppercase

"hello" → "HELLO"

Lowercase

Convert to lowercase

"HELLO" → "hello"

Substring

Extract portion of text

"Hello World"[0:5] → "Hello"

Length

Count characters

"Hello" → 5

Split

Divide text into array

"a,b,c" → ["a","b","c"]

Join

Combine array to string

["a","b"] → "a,b"

Starts With

Check text beginning

"Hello World", "Hello" → true

Ends With

Check text ending

"Hello World", "World" → true

Index Of

Find substring position

"Hello World", "World" → 6

Pad Start

Add characters at start

"5", Len:3, Pad:"0" → "005"

Pad End

Add characters at end

"5", Len:3, Pad:"0" → "500"

Repeat

Duplicate text

"Ha", Count:3 → "HaHaHa"


Arithmetic Operations

Operation

Description

Example

Add

Addition

5 + 3 → 8

Subtract

Subtraction

10 - 4 → 6

Multiply

Multiplication

6 × 7 → 42

Divide

Division

20 ÷ 4 → 5

Modulo

Remainder

10 % 3 → 1

Round

Round to nearest

3.7 → 4

Floor

Round down

3.9 → 3

Ceil

Round up

3.1 → 4

Absolute

Positive value

-5 → 5

Square

Calculate square

4² → 16

Minimum

Find smallest

Min(5,3,9) → 3

Maximum

Find largest

Max(5,3,9) → 9

Random

Random 0-1

Random() → 0.739...

Random Between

Random in range

Between(1,10) → 7


Advanced Math

Operation

Description

Example

Power

Raise to exponent

2^3 → 8

Square Root

Calculate square root

sqrt(16) → 4

Exponential

Calculate e^x

e^1 → 2.71828...

Natural Log

Natural logarithm (ln)

ln(e) → 1

Log10

Base-10 logarithm

log10(100) → 2

Log2

Base-2 logarithm

log2(8) → 3

Factorial

Calculate factorial

5! → 120

GCD

Greatest Common Divisor

GCD(12,18) → 6

LCM

Least Common Multiple

LCM(4,6) → 12


Array Operations

Operation

Description

Example

Includes

Check if value exists

[1,2,3].includes(2) → true

Nth Element

Get element at position

[10,20,30][1] → 20

First Element

Get first element

[1,2,3].first() → 1

Last Element

Get last element

[1,2,3].last() → 3

Slice Array

Extract portion

[1,2,3,4,5].slice(1,3) → [2,3]

Reverse Array

Reverse order

[1,2,3].reverse() → [3,2,1]

Unique Values

Remove duplicates

[1,2,2,3] → [1,2,3]

Flatten Array

Convert nested to flat

[[1,2],[3,4]] → [1,2,3,4]

Remove Empty

Filter empty values

[1,null,3,"",5] → [1,3,5]

Count Elements

Get array length

[1,2,3].count() → 3

Sum of Array

Sum all numbers

[1,2,3].sum() → 6

Average

Calculate mean

[2,4,6].average() → 4

Min in Array

Find smallest

[5,2,8].min() → 2

Max in Array

Find largest

[5,2,8].max() → 8


Statistics

Operation

Description

Example

Median

Find middle value

[1,3,5].median() → 3

Mode

Most frequent value

[1,2,2,3].mode() → 2

Std Deviation

Measure variation

[2,4,6,8].stddev() → 2.58

Variance

Squared differences

[2,4,6,8].variance() → 6.67

Count Non-Empty

Count valid values

[1,null,3,"",5] → 3

Percentile

Value at percentile

[1,2,3,4,5].pct(75) → 4

Quartile

Divide into four

[1..8].quartile() → Q1:2.5, Q2:4.5

Rank

Assign rank order

[5,2,8,2].rank() → [3,1,4,1]

Correlation

Measure relationship

X:[1,2,3], Y:[2,4,6] → 1.0

Forecast

Predict future

[10,15,20].forecast(2) → [25,30]

Trend

Identify direction

[10,15,20,25] → "increasing"

Growth Rate

Calculate % change

Start:100, End:150 → 50%


Date/Time Operations

Operation

Description

Example

Date Add

Add time to date

"2024-01-01" + 7 days → "2024-01-08"

Date Subtract

Subtract time

"2024-01-08" - 7 days → "2024-01-01"

Date Format

Change format

"2024-01-01" → "Jan 01, 2024"

Current DateTime

Get current time

Now() → "2024-01-15T10:30:00Z"

Time Subtract

Time difference

"14:30" - "10:00" → "4:30"

Convert Date

Transform format

"01/15/2024" → "2024-01-15"


Comparison Operations

Operation

Description

Example

Contains

Check substring

"Hello World".contains("World") → true

Equals

Check exact match

5 == 5 → true

Not Equals

Check different

5 != 3 → true

Greater Than

Check larger

10 > 5 → true

Less Than

Check smaller

3 < 7 → true

Greater or Equal

Check >=

5 >= 5 → true

Less or Equal

Check <=

3 <= 5 → true

Is Present in List

List membership

"apple" in ["apple","banana"] → true

Is Empty

Check null/empty

"" → true

Is Not Empty

Check has content

"Hello" → true

Length In

Length matches

"Hello".length in [5,10] → true

Length >=

Minimum length

"Hello".length >= 3 → true

Length <=

Maximum length

"Hi".length <= 5 → true


Logic Operations

Operation

Description

Example

Condition

IF-THEN-ELSE logic for decisions

IF age >= 18 THEN "Adult" ELSE "Minor"

Branch

Split flow into multiple paths

Route by userType: admin/user/guest


Joiners

Operation

Description

Example

AND

All conditions must be true

(age>18) AND (hasLicense) → Both true

OR

Any condition can be true

(isAdmin) OR (isModerator) → Either true


Encoding/Decoding Operations

Operation

Description

Example

Base64 Encode

Convert to Base64

"Hello" → "SGVsbG8="

Base64 Decode

Convert from Base64

"SGVsbG8=" → "Hello"

URL Encode

Encode for URLs

"hello world" → "hello%20world"

URL Decode

Decode from URLs

"hello%20world" → "hello world"

HTML Encode

Convert HTML entities

"<div>" → "<div>"

HTML Decode

Decode HTML entities

"<div>" → "<div>"


Hash & Crypto

Operation

Description

Example

MD5 Hash

Generate MD5 hash

Checksums, basic hashing

SHA1 Hash

Generate SHA1 hash

Data integrity, checksums

SHA256 Hash

Generate SHA256 hash

Secure hashing, verification

Encrypt

Encrypt data with key

Secure sensitive data

Decrypt

Decrypt data with key

Access encrypted data


Utility Operations

Operation

Description

Example

Sleep/Delay

Pause execution

Rate limiting, wait for processes

Throttle

Limit execution rate

API rate limiting, prevent abuse

Debounce

Delay until idle

Handle rapid inputs, optimize

UUID Generator

Generate unique ID

Create IDs, tracking codes


AI & Advanced Operations

Operation

Description

Example

AI Generator

Generate content using AI

Prompt: "Write email for {name}" → Generated text

Code Block

Execute custom JavaScript

Code: return input * 2 + 10; → Result

Cast

Convert data types

"123" (string) → 123 (number)

Fetch

Pull data from another datasheet

Get sum of orders for customer


For implementation details, see the Logic Composer