Math Functions

Numerical Functions

Average

Average(Double,...)
Returns the average of the entered values

Abs

Abs(Double)
Returns the absolute value of any supplied number

Sign

Sign(Double)
Returns the arithmetic sign (+1, -1 or 0) of a supplied number
Example : Sign(-2)=-1

Max

Max(Double,...)
Returns the maximum of the entered values

Min

Min(Double,...)
Returns the minimum of the entered values

Power

Power(Double,Double)
Calculates a given number, raised to a supplied power

Sqrt

Sqrt(Double)
Calculates the positive square root of a supplied number

Round

Round(Double,Double)
Rounds a supplied number up or down, to a specified number of decimal places

Degrees

Degrees(Double)
Converts radians into degrees

Radians

Radians(Double)
Converts degrees into radians

Cos

Cos(Double)
Returns the Cosine of a number

Sin

Sin(Double)
Returns the Sine of a number

Tan

Tan(Double)
Returns the Tangeant of a number

ACos

ACos(Double)
Returns the Arccosine of a number

ASin

ASin(Double)
Returns the Arcsine of a number

ATan

ATan(Double)
Returns the Arctangeant of a number

Pi

Pi()
Returns the constant value of pi

DoubleToString

DoubleToString(Double)
Return the String that represents the double value
Example : DoubleToString(2)="2"

Length

Length(String)
Returns the length of a supplied text string
Example : Length("test")=4

Truncate

Truncate(Double,Double)
Returns the truncated number based on a number of digit


Example : Truncate(-53.456677,2)=-53.45

String Manipulation Functions

StripLetters

StripLetters(String)
Removes all letter characters and white spaces from a string
Example : StripLetters("Run 1")="1"

Concatenate

Concatenate(String,String,...)
Join two or more text strings into one string
Example : Concatenate("test1","-","test2")="test1-test2"

Replace

Replace(String,Double,Double,String)
Replaces part of a text string, based on the number of characters you specify, with a different text string
Example : Replace("01234567",2,5,"Hello")="01Hello7"

Substitute

Substitute(String,String,String)
Substitutes new_text for old_text in a text string
Example : Substitute("test1","1","2")="test2"

Lower

Lower(String)
Converts all characters in a supplied text string to lowercase
Example : Lower("TesT1")="test1"

Proper

Proper(String)
Converts all characters in a supplied text string to proper case
Example : Proper("tesT1")="Test1"

Upper

Upper(String)
Converts all characters in a supplied text string to uppercase
Example : Upper("test1")="TEST1"

Left

Left(String,Double)
Returns a specified number of characters from the start of a supplied text string
Example : Left("test",3)="tes"

Right(String,Double)
Returns a specified number of characters from the end of a supplied text string
Example : Right("test",3)="est"

Mid

Mid(String,Double,Double)
Returns a specified number of characters from the middle of a supplied text string.
Example : Mid("test1",2,2)="st"

TextJoin

TextJoin(String,Boolean,String,...)
Joins together a series of supplied text strings into one combined text string. The user can specify a delimiter to add between the individual text items, if required.Ignore_empty is to allow to ignore empty cells to not end up with two delimiter consecutively
Example : TextJoin("-",false,"Test1","Test2")="Test1-Test2"

GetCurrentUserProperty

GetCurrentUserProperty(String)
Returns the current username. It allows to display UserName or DisplayName according to the parameter used as input ("Username", "DisplayName")

Logical Functions

If

If(Boolean,Any,Any)
An if statement. The return type is dependent on the return types of the 2nd and 3rd arguments. If there is any mismatch then their string values are returned
Example : If(1>0,"Correct","Incorrect")="Correct"

GetPropertyValue

GetPropertyValue(Part,PartProperty,type)
Returns Part.PartProperty. The type is the return type ("string","double", "boolean"). It allows to have dynamic part property access.
Example : GetPropertyValue(SpringFL,"Rate","double") returns SpringFL.Rate
GetPropertyValue(ARBFront,Concatenate("kArb_",PosFL.Name"_",ARBPosFR.Name),"double") returns ARBFront.kArb_1_1 if ARBPosFL & FR are equal to "1".

IsNull

IsNull(Double, String, Boolean, DateTime)
Returns true if the input value is null

Date Time Functions

DateTimeToString

DateTimeToString(DateTime,String)
Formats a DateTime as a string using the provided format.
Example : If datetime is Friday 3rd of July 2019, 05:12:15.325 PM, then DateTimeToString(DateTime,"yyyy")="2019"
Other values for format string :
"yy" returns "19"
"MM" returns "07", "MMM" returns "JUL", "MMM" returns "JULY"
"dd" returns "03", "ddd" returns "Fri" , "dddd" returns "Friday"
"hh" returns "05", "HH" returns "17"
"mm" returns "12"
"ss" returns "15"
"ss.fff" returns "15.325", "ss.f" returns "15.3"
"tt" returns "PM"
"yyyy/MM/dd" returns "2019/07/03"
"hh:mm:ss" returns "05:12:15"

Still need help? Contact Us Contact Us