Inline functions provided

The following functions are provided.

Function Description Usage Arguments
Abs Returns the absolute value of a number. fn-Abs(input number) input number: A number for which you want the absolute value
And

Returns true if the first function and the second function returns true.

fn-And(greaterthan(value1,value2), lessthan(value3,value4))

function1: A function which returns a boolean (true/false) value.

function2: A function which returns a boolean (true/false) value.

Contains

Returns true if the first argument contains (at the beginning, at the end, or anywhere within) the second argument.

fn-Contains(value1, value2)

value1: A string value that might contain value2.

value2: A string value that might be contained in value1.

Currency Represents a numeric value as a currency formatted text. fn-Currency(number to format) number to format: A number for which you want to format as currency type
DateDiffDays Determines the number of days between two dates. The result can be a decimal value including partial days. fn-DateDiffDays(start date, end date) start date, end date: Dates for which you want to calculate number of days between.
DateDiffHours Determines the number of hours between two dates. The result can be a decimal value including partial hours. fn-DateDiffHours(start date, end date) start date, end date: Dates for which you want to calculate number of hours between.
DateDiffMinutes Determines the number of minutes between two dates. The result can be a decimal value including partial minutes. fn-DateDiffMinutes(start date, end date) start date, end date: Dates for which you want to calculate number of minutes between.
DateDiffSeconds Determines the number of seconds between two dates. The result can be a decimal value including partial seconds. fn-DateDiffSeconds(start date, end date) start date, end date: Dates for which you want to calculate number of seconds between.
EndsWith

Returns true if the first argument ends with the second argument.

fn-EndsWith(value1, value2)

value1: A string value that might end with value2.

value2: A string value that might be used at the end of value1.

Equals

Returns true if the second argument is equal to the first argument.

fn-Equals(value1, value2)

value1: A string value that value2 is to be compared to.

value2: A string value to compare to value1.

FormatDate Represents a date time value in text of a specific format. fn-FormatDate(date to format, format string)

date to format: Date value to format.

format string: The template string defining how to format the date value.

Example: formatDate("10/25/2014", "dddd, MMMM d, yyyy")

Result: Saturday, October 25, 2014

GreaterThan

Returns true if the second argument is greater than the first argument.

fn-GreaterThan(value1, value2)

value1: An integer value that value2 might be greater than.

value2: An integer value that might be greater than value1.

GreaterThanOrEqual

Returns true if the second argument is greater than or equal to the first argument.

fn-GreaterThanOrEqual(value1, value2)

value1: An integer value that value2 might be greater than or equal to.

value2: An integer value that might be greater than or equal to value1.

IsCurrentUser

Returns true if the current user is the same user specified in the string argument.

fn-IsCurrentUser(username) username: The string value to evaluate if it matches the current username. The username includes the domain name. Example: johndoe@crestan.onmicrosoft.com
If Checks whether a condition is met, and returns one value if true, and another value if false. fn-If(logical_test, value_if_true, value_if_false)

logical_test: Expression, function, or value which value is true or false.

value_if_true: Value to take if the logical_test is true.

value_if_false: Value to take if the logical_test is false.

Insert Adds text in to a larger string. fn-Insert(string to modify, position to insert new text, text to insert)

string to modify: Input string that will be modified.

position to insert new text: Number value specifying where in the string to insert the text.

text to insert: The text to insert into string to modify.

IsDate

Returns true if the argument is a date.

fn-IsDate(value) value: The string value to evaluate if it is in a date format.
IsMemberOfGroup

Returns true if the current user belongs to the Windows or SharePoint group specified in the string argument.

fn-IsMemberOfGroup(groupname) groupname: The string value of the SharePoint group name to evaluate if the current user is a member of.  
IsNullOrEmpty

Returns true if the argument is empty or null.

fn-IsNullOrEmpty(value) value: The string value to evaluate if it's empty or null.
IsNumeric

Returns true if the argument is a number. 

fn-IsNumeric(value) value: The string value to evaluate if it is a number.
Length Returns the number of characters in a string. fn-Length(text to count) text to count: the input string for which to count the length.
LessThan

Returns true if the second argument is less than the first argument.

fn-LessThan(value1, value2)

value1: An integer value that value2 might be less than.

value2: An integer value that might be less than value1.

LessThanOrEqual

Returns true if the second argument is less than or equal to the first argument.

fn-LessThanOrEqual(value1, value2)

value1: An integer value that value2 might be less than or equal to.

value2: An integer value that might be less than or equal to value1.

Max Returns the greater of two numbers. fn-Max(first number, second number) first number, second number: The numbers to be compared for return of the greater one.
Min Returns the lesser of two numbers. fn-Min(first number, second number) first number, second number: The numbers to be compared for return of the lesser one.
NewGuid Generate a globally unique identifier. fn-NewGuid() (no arguments)
Not

Returns the reverse of the boolean value. If value is true, then the function returns false. If value is false, function will return true. Use when you want to make sure a value is not equal to one particular value.

fn-Not(bool value) Bool value: A value that evaluates to either true or false.
Or

Returns true if either the first function or the second function returns true.

fn-Or(greaterthan(value1,value2), lessthan(value3,value4))

function1: A function which returns a boolean (true/false) value.

function2: A function which returns a boolean (true/false) value.

PadLeft Returns the provided string right aligned and padded to the total length with a specific character. fn-PadLeft(string to pad, desired total length, [optional padding character])

string to pad: Input string.

desired total length: A number to determine how long the padding will be.

[optional padding character]: Optional. Character used to fill the padding.

PadRight Returns the provided string left aligned and padded to the total length with a specific character. fn-PadRight(string to pad, desired total length, [optional padding character])

string to pad: Input string.

desired total length: A number to determine how long the padding will be.

[optional padding character]: Optional. Character used to fill the padding.

Power Raises a number to the specified power. fn-Power(input number, power of number)

input number: The base number.

power of number: The exponent to which the base number is raised.

Remove Removes a section of text in a larger string. fn-Remove(string to modify,position to begin removing text from, number of characters to remove)

string to modify: The string that you want to remove the text from.

position to begin removing text from: The position in the string at which you want to start removing the text.

number of characters to remove: The number of characters in the string that you want to remove.

Replace Replaces a section of text in a larger string. fn-Replace(text to modify, old text to replace, replacement text)

text to modify: The text in which you want to replace some characters.

old text to replace: The string you want to find in the original text to modify.

replacement text: The new text that will replace the Old text to replace.

Round Rounds a decimal value to the nearest integer. fn-Round(number to round) number to round: The value to round.
StartsWith

Returns true if the first argument starts with the second argument.

fn-StartsWith(value1, value2)

value1: A string value that might start with value2.

value2: A string value that might be used at the start of value1. 

SubString

Extracts and returns a portion of text from a string.

fn-SubString(sourceString, startIndex, length)

sourceString: The entire string.

startIndex: The starting character (1-based).

length: The number of characters to include.

ToLower Formats text in a string to all lower case. fn-ToLower(text to make lower case) text to make lower case: The text that you want to convert to lower case.
ToTitleCase Formats text in a string to title case. fn-ToTitleCase(text to make title case) text to make title case: The text that you want to convert to title case.
ToUpper Formats text in a string to all upper case. fn-ToUpper(text to make upper case) text to make upper case: The text that you want to convert to upper case.
Trim Removes leading and trailing whitespace from a string. fn-Trim(text to trim) text to trim: The text from which you want to remove leading and trailing white spaces.
XmlDecode Decodes a HTML safe string to regular text. fn-XmlDecode(text to decode) text to decode: The text that you want to decode from html safe string to regular text.
XmlEncode Encodes a string to make it safe for viewing in HTML. fn-XmlEncode(text to encode) text to encode: The text that you want to encode to make it safe for viewing in HTML.