Function

Introduction

This document outlines the integration between Autom Mate and the Function Feature, explaining how Autom Mate enhances functionality through predefined functions.

The collaboration between Automate and the Function Feature enables users to leverage predefined functions seamlessly, enhancing workflow capabilities and productivity.

What is the Function Feature?

Overview of the Function Feature: The Function Feature provides users with a library of predefined functions that can be easily integrated into actions within Automate.

Key Features:

  • Predefined functions for enhanced functionality

  • Easy integration within actions

  • Streamlined workflow automation

Autom Mate Integration with the Function Feature

Overview of Integration: Autom Mate seamlessly integrates with the Function Feature, allowing users to incorporate predefined functions into their workflow actions.

Examples of Automated Tasks:

  • Utilizing predefined functions for data manipulation

  • Implementing conditional logic using predefined functions

How To Use Feature

The Function Feature allows users to leverage predefined functions within their workflow actions. This action facilitates enhanced functionality and automation capabilities within Automate workflows.

Usage:

  1. Navigate to the message or command space within the action control center.

  2. Write 'fn.' to access the predefined functions.

  3. Select the desired function from the dropdown menu.

Inputs:

  • Function parameters may vary based on selected function.

Outputs:

  • Results or responses generated by the selected function.

Example Steps:

  • Define number 1 and number 2 first.

  • After that assign those numbers as random number selection.

  • After assigned the random numbers, you can use the fn. feature to sum those two numbers at the value to assign section.

  • After that you can create a display message to convert those sums as $. To do that you can use fn. with ToCurrency feature.

  • As a result, user sum random two numbers and define them as currency.

Usage of Each Functions

This guide explains functions that will help you perform various data manipulation operations. Each function performs a specific task and facilitates your data processing workflow.

Functions are crucial building blocks that contribute to making your data modular and comprehensible. A function is an independent and reusable code block that accomplishes a specific task. This block is grouped under a name and, when called, executes a particular operation.

Functions properties can be used in all input fields within Autom Mate.

Data Manipulation Functions

In this section, you will find functions used to perform various manipulation operations on text data. These functions assist you in editing, transforming, and checking your text data

UpperCase

This function is used to convert a text entirely into uppercase. You can use the function as follows:

fn.UpperCase(text)

LowerCase

This function is used to convert a text entirely into lowercase. You can use the function as follows:

fn.LowerCase(text)

Capitalize

This function is used to capitalize the first letter of a text. You can use the function as follows:

fn.Capitalize(text)

Replace

This function is used to replace a specific character or string of characters in a text with another character or string. You can use the function as follows:

fn.Replace(text|old_str|new_str)

Contains

This function is used to check whether a text contains a specific character or string of characters. For example, if "text" contains the target_str, it returns "True"; otherwise, it returns "False." You can use the function as follows:

fn.Contains(text|target_str)

RemoveHTML

This function is used to remove HTML tags from a text. For example:

Math Functions

Mathematical functions are specialized functions that enable you to easily perform various mathematical calculations. These functions encompass a wide range of mathematical operations, such as performing basic mathematical operations on numbers.

Sum

This function is used for basic addition, performing mathematical calculations. You can use the function as follows:

fn.Sum(number1|number2|decimal)
fn.Sum(15|5|3) = 20,000

Difference

This function is utilized to calculate the difference between two numbers. You can use the function as follows:

fn.Difference(number1|number2|decimal)
fn.Difference(15|5|2) = 10,00

Multiply

This function is employed for multiplying two numbers. You can use the function as follows:

fn.Multiply(number1|number2|decimal)
fn.Multiply(3|4|4) = 12,0000

Divide

This function is used to divide one number by another. You can use the function as follows:

fn.Divide(number1|number2|decimal)
fn.Divide(8|2|1) = 4,0

Ceil

This function rounds the input number to the next greater integer or float. You can specify the precision of the decimal digits. You can use the function as follows:

fn.Ceil(1234.567|0) OR fn.Ceil(1234.567) = 1235
fn.Ceil(-1234.567) = -1234
fn.Ceil(1234.567|2) = 1234.57
fn.Ceil(1234.567|-2) = 1300

Average

This function takes the average of the entered numbers. You can specify the precision of the decimal digits. You can use the function as follows:

fn.Avg(<number 1>|<number 2>|<number n>|<decimal place>)
fn.Avg(10|15|5) OR fn.Avg(10|15|5|precision:0) = 10
fn.Avg(10|15|5|precision:2) = 10,00
fn.Avg(12.34|56|78|precision:2) = 48.78
fn.Avg(12.34|56|78) = 48

Mod

This function divides left hand operand by right hand operand and returns the remainder. You can use the function as follows:

fn.Mod(<number 1>|<number 2>|<decimal place>)
fn.Mod(10|15) OR fn.Mod(10|15|0) = 10
fn.Mod(15|10|2) = 5,00
fn.Mod(12.34|9|0) = 3
fn.Mod(12.34|9|2) = 3.34

Power of

This function takes two operands: the left-hand operand is the base, and the right-hand operand is the exponent. It multiplies the base by itself as many times as indicated by the exponent and returns the result of that operation. You can use the function as follows:

fn.PowerOf(<number>|<exponent>|<decimal place - optional>)
fn.PowerOf(2|3|0) OR fn.PowerOf(2|3) = 8
fn.PowerOf(9|1.5) = 27.00
fn.PowerOf(9|1.5|0) = 27
fn.PowerOf(5|-1.2) = 0.14495593273554

Absolute

This function returns the absolute (positive) value of a number. You can use the function as follows:

fn.Abs(<value>|<decimal place>)
fn.Abs(123|0) OR fn.Abs(123) = 123
fn.Abs(-123) = 123
fn.Abs(-123|2) = 123.00
fn.Abs(-123.45|2) = 123.45

Round

This function returns a value with a specified number of decimal places. Function rounds off a numerical value. You can use the function as follows:

fn.Round(<value>|<precision>)
fn.Round(1234.567|0) OR fn.Round(1234.567) = 1235
fn.Round(-123.456) = -123
fn.Round(1234.567|2) = 1234.57
fn.Round(1234.567|-2) = 1200

Is Even

This function checks the integer input and returns true if it is an even number. You can use the function as follows:

fn.IsEven(<value>)
fn.IsEven(1234) = true
fn.IsEven(123) = false

Is Odd

This function checks the integer input and returns true if it is an odd number. You can use the function as follows:

fn.IsOdd(<value>)
fn.IsOdd(1234) = false
fn.IsOdd(123) = true

Floor

This function rounds the input number to the next smaller integer or float. You can specify the precision of the decimal digits. You can use the function as follows:

fn.Floor(<value>|<precision>)
fn.Floor(1234.567|0) OR fn.Floor(1234.567) = 1234
fn.Floor(-1234.567) = 1235
fn.Floor(1234.567|2) = 1234.56
fn.Floor(1234.567|-2) = 1200

To Float

This function converts data to a float (number) type. You can use the function as follows:

fn.ToFloat(<value>|<decimal place>)
fn.ToFloat(12|1) OR fn.ToFloat(12) = 12.0
fn.ToFloat(-12|2) = -12.00
fn.ToFloat(1234.567|2) = 1234.56

To Integer

This function converts data to an integer type. You can use the function as follows:

fn.ToInt(<value>)
fn.ToInt(1234.567) = 1234

To String

This function converts data to a string (text) type. You can use the function as follows:

Default type is empty. There are only 2 types “short” and “long” related with the date format data.

fn.ToStr(<value>|<type>)
fn.ToStr(12.34) =12.34
fn.ToStr([1, 2, 3]) = “[1, 2, 3]”
fn.ToStr({“name”: “Autom Mate”}) ={name: “Autom Mate”}
fn.ToStr(2024-01-01T11:59:59.000000-07:00) =2024-01-01T11:59:59.000000-07:00
fn.ToStr(2024-01-01T11:59:59.000000-07:00|short) =01 Jan 11:59
fn.ToStr(2024-01-01T11:59:59.000000-07:00|long) = “January 01, 2024 11:59

To Currency

This function formats int/number to a currency-style. You can use the function as follows:

fn.ToCurrency(<value>|<style>)

Style      | Code       | Description
Delimiter  | delimiter  | Thousands seperator
Unit       | unit       | Currency unit
Seperator  | seperator  | The seperator character for decimal places
Precision  | precision  | Decimal place
Format     | format     | The position of the unit

Default unit is $

fn.ToCurrency(123|unit:£) = £123
fn.ToCurrency(12345|unit:£|delimiter:.) = £12.345
fn.ToCurrency(12345|unit:₺|delimiter:,|format:vu) = 12,345
fn.ToCurrency(12345.678|delimiter:.|precision:3) = $12.345.678

To Phone

This function converts string or number to a formatted phone number (user-defined). You can use the function as follows:

fn.ToPhone(<value>|<delimiter:optional>|<format:optional>|<c_code:optional>|<a_code:optional>)

Style      | Code       | Description
Area Code  | a_code     | Area code
Unit       | c_code     | Country code
Format     | format     | Phone number format

Default delimiter is “ “ (whitespace)

fn.ToPhone(1234567) = 123 4567
fn.ToPhone(1234567|delimiter: -) = 123-4567
fn.ToPhone(1234567|delimiter: -|format: *** ** **) = 123-45-67
fn.ToPhone(4567890|c_code: 1|c_code_symbol) = +1 456 7890
fn.ToPhone(1234567890|c_code: 1|format:  * *** *** ** **) = 1 123 456 78 90
fn.ToPhone(1234567890|format: *** *** ** **) = 123 456 78 90
fn.ToPhone(1234567890|format: *** *** ** **|a_code) = (123) 456 78 90
fn.ToPhone(1234567890|c_code: 1|c_code_symbol|a_code) = +1 (123) 456 789

Last updated