What formulas can I use?

In JungleMail you can use formulas to achieve many different things. In other words, formulas help you to get the most out of JungleMail. In this tutorial, you will learn how to use formulas, and we will give you a list of information you can use whilst writing them.

JungleMail formulas are much similar to formulas used in spreadsheet programs such as Excel. You can use different values, functions and operators to build formula.

To execute formulas in your email body you should surround them with {}.
Example: {FormatDate(Today; "yyyy")}

To execute formulas in the repeater conditions configuration window surrounding the formula with  {} IS NOT REQUIRED.
Example: FormatDate(Today; "yyyy")

Formulas are used in:

  • Email templates.

Common Values

  • Now – Retrieves current date and time. Text representation of date and time depends on the current SharePoint Site Regional Settings.
    Example: Now Result: 15/1/2015 12:55:56 PM
  • Today – Retrieves current date (time is 00:00). Text representation of date depends on current SharePoint Site Regional Settings.
    Example: Today Result: 15/1/2015 12:00:00 AM

Note: Value types are automatically converted.
Example: "10" + 2 Result: 12

SharePoint Specific Values

  • SharePoint Column values. Column display name or internal name can be used in formulas.
    Example: Title
  • SharePoint Lookup Column values. Use a semicolon to specify lookup related column name.
    Example: Customer:Address
  • Me – Retrieves current SharePoint User full name.
  • Other SharePoint specific values like ListTitleListUrlItemUrl.

Common Functions

  • FormatDate(date; format) – Converts date to text representation using specified format ("dd", "dddd", "yy", "yyyy", "MM", "MMMM"). It also can be used to extrtact part of a date.
    Example: FormatDate(Today; "yyyy") Result: 2015 Example: FormatDate(Today; "MMMM" "yyyy") Result: January 2015 Example: FormatDate(Today; "dddd","dd" "MM" "yyyy")Result: Thursday, 15 01 2015

    Read more about Standard Date and Time Format Strings and Custom Date and Time Format Strings.

  • CurrencyToLiteral(amount) – Converts number to a currency text representation. Currency format is taken from SharePoint Currency Column settings.
    Example: CurrencyToLiteral(TotalAmount) Result: two thousand five hundred dollars and zero cents Note: TotalAmount Column value is $2500.
  • Now() – Retrieves current date and time. The same as Now value
  • Today() – Retrieves current date. The same as Today value.
  • SubString(text; startPosition)SubString(text; startPosition; length) – Retrieves a substring from text. The substring starts at a specified character position and has a specified length. First character is at 0 position.
    Example: SubString("abcde"; 1) Result: bcde 
    Example: SubString("abcde"; 2; 1) Result: c
  • Lower(text) – Converts text to lowercase.
    Example: Lower("The Table") Result: the table
  • Upper(text) – Converts text to uppercase.
    Example: Upper("The Table") Result: THE TABLE
  • PadLeft(text; totalLength)PadLeft(text; totalLength; symbol) – Right-aligns the characters in text, padding with spaces or symbol on the left for a specified total length.
    Example: PadLeft("123"; 5; "0") Result: 00123
  • PadRight(text; length)PadRight(text; totalLength; symbol) – Left-aligns the characters in text, padding with spaces or symbol on the right for a specified total length.
    Example: PadRight("123"; 5; "0") Result: 12300
  • FirstWord(text) – Retrieves a first word from text.
    Example: FirstWord("One Two Three") Result: One

Common Operators

  • + – Addition.
  • - – Subtraction.
  • * – Multiplication.
  • / – Division.
  • & – Concatenation – Used for combining strings together.
    Example: "The" & " table" Result: "The table"

SharePoint Specific Operators

  • Colon (:) — Used for SharePoint Lookup Columns.
    Example: Customer:Address

Proper function

The Proper function sets the first character in each word to uppercase and the rest to lowercase.

  • Example: PROPER(text) Result: This Is An Example


  • Calculating tomorrow's date: Today + 1.
  • Current time: FormatDate(Now; "t").
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us