Help Center
  • What is GridMate
  • πŸ“ŒGetting Started
    • Package Setup
    • Appexchange
  • 🎬Product Tour
    • Related List Grid
    • Parent Related List Grid
    • List View Grid
    • Kanban List View Grid
    • Field Set Grid
    • User Grid
    • Pivot Grid
    • Report Table
    • Multi Calendar
    • Object Timeline
    • File Explorer
    • Record Layout
    • Record KPI
    • Field Path
    • Map Record
    • Map List
    • Utility Bar Grid
    • Record App Switcher
    • Flow Grids
    • Compact Calendar
  • πŸš€Advanced Guides
    • Grid - Advanced Configuration
    • Grid - Mass/Record Actions
    • Grid - Advanced Filtering
    • Grid - Inline Components
    • Grid - Mass Edit Button
    • Grid - Enhanced Filter Builder
    • Grid - Data Import Wizard
    • Grid - Dynamic Formula Field
    • Grid - Grid Explorer
    • Grid - Dynamic Interaction
    • Grid - Dynamic FieldSet Grid
    • Grid - Dynamic Record Card
    • Grid - Custom Action
    • Grid - Interactive Filters
    • Grid - Bulk Action
    • Grid - Custom Inline Component
    • Grid - Config Checker
    • Grid - Admin Cockpit
    • User Grid - Split View
    • User Grid - Data Filtering
    • User Grid - Deployment Process
    • Map List - Search Around Setup
    • Salesforce Classic Setup
  • πŸ“¦Package Reference
    • Components Library
      • GM - RelatedList Grid
      • GM - FieldSet Grid
      • GM - ListView Grid
      • GM - FieldSet Kanban
      • GM - ListView Kanban
      • GM - Parent RelatedList Grid
      • GM - RelatedList Tabs
      • GM - RelatedList Accordion
      • GM - RelatedList Cards
      • GM - Record Layout
      • GM - Record Layout (LWC)
      • GM - Record Card
      • GM - Dynamic Tabs
      • GM - Dynamic Accordion
      • GM - Flow Layout
      • GM - Field Path
      • GM - Multi Calendar
      • GM - FieldSet Pivot
      • GM - Flow View Grid
      • GM - Flow Edit Grid
      • GM - Record App Switcher
      • GM - Map Record
      • GM - Map List
      • GM - Report Table
      • GM - Object Timeline
      • GM - User Grid
      • GM - File Explorer
      • GM - Dynamic FieldSet Grid
      • GM - Dynamic Record Card
      • GM - User Grid Split View
      • GM - Compact Calendar
      • GM - Interaction Logger
    • Javascript Formulas
    • DataGrid Settings
  • Tools
    • SF Cli Plugin
    • Chrome Extension
  • πŸ“¬TROUBLESHOOTING
    • βš™οΈConfig Snippets
      • Layout - basic setup
      • Layout with read only field
      • Layout with field visibility
      • Layout with section visibility
      • Layout with autocomplete
      • Inline FieldSet Grid
      • Inline RelatedList Grid
      • Inline Record Layout
      • Inline Chatter Feed
      • Multiple Inline Components
      • Calendar - Extra Activities
      • Field Path Stages
      • Dynamic Tabs
      • Compact Calendar
      • Object Timeline
    • ❓FAQ
  • πŸ“‹Release Notes
Powered by GitBook

Links

  • Appexchange
  • Pricing
  • Solution

Social

  • Youtube
  • LinkedIn
  • X

2025 GridMate

On this page
  • Data Types
  • Operators
  • Functions
  • Math Functions
  • Text Functions
  • Logical Functions
  • Date Functions
  • Other Functions

Was this helpful?

  1. Package Reference

Javascript Formulas

GridMate provides a lightweight javascript syntax to define calculated columns on the browser side. The formulas are calculated when a grid rendered to the end user or a field is updated.

Data Types

Currently the javascript engine supports the following data types as a return value:

  • Text

  • Checkbox

  • Date

  • Number

  • Currency

  • Percent

  • RichText

Note that the data type is also used to customize the display for the user

Operators

Currently the following operators are supported:

  • +:(plus)

  • -:(minus)

  • *:(multiply)

  • /:(divide)

  • %:(Modulus)

  • <:(less than)

  • >::(greater than)

  • <=:(less or equal)

  • >=:(greater or equal)

  • &&:(and)

  • ||:(or)

  • ==:(equal)

  • !=:(not equal)

Functions

Math Functions

  • CEILING(number) : rounds up and returns the smallest integer greater than or equal to a given number.

  • EXP(number) : returns e raised to the power of a number.

  • FLOOR(number) : rounds down and returns the largest integer less than or equal to a given number.

  • LN(number) : returns the natural logarithm (base e) of a number.

  • LOG(number) : returns the base 10 logarithm of a number.

  • MAX(number, number) : returns the largest of the numbers given as input parameters.

  • MIN(number, number) : returns the smallest of the numbers given as input parameters.

  • ROUND(number, num_digits) : returns the value of a number rounded to the nearest integer.

  • SQRT(number) : returns the square root of a number.

Text Functions

  • BEGINS(text, compare_text) : determines if text begins with specific characters.

  • CONCAT(text1, text2) : concats two arguments of text and returns the concatenated text.

  • CONTAINS(text, compare_text) : compares two arguments of text and returns true if the first argument contains the second argument.

  • LEFT(text, num_chars) : returns the specified number of characters from the beginning of a text string.

  • LEN(text) : returns the number of characters in a specified text string.

  • LOWER(text) : converts all letters in the specified text string to lowercase.

  • LPAD(text, padded_length, pad_string) : inserts characters you specify to the left-side of a text string.

  • MID(text, start_num, num_chars) : returns the specified number of characters from the middle of a text string given the starting position.

  • RIGHT(text, num_chars) : returns the specified number of characters from the end of a text string.

  • RPAD(text, padded_length, pad_string) : inserts characters that you specify to the right-side of a text string.

  • SUBSTITUTE(text, old_text, new_text) : substitutes new text for old text in a text string

  • TRIM(text) : removes the spaces and tabs from the beginning and end of a text string.

  • UPPER(text) : converts all letters in the specified text string to uppercase.

Logical Functions

  • ISNULL(expression) : determines if an expression is null.

  • NOT(logical) : returns the inverse of the given expression.

  • OR(logical1, logical2) : determines if expressions are true or false. Returns true if any expression is true.

  • AND(logical1, logical2) : returns a true response if all values are true.

  • IF(logical_test, value_if_true, value_if_false) : determines if expressions are true or false. Returns a given value if true and another value if false.

  • CASE(expression, ​value1, result1, ...) : checks a given expression against a series of values. If the expression is equal to a value, returns the corresponding result.

Date Functions

  • DATEADD(date, amount, unit): Adds a specified time value to a date.

  • DATEDIFF(start, end, unit) : Returns the difference between two dates.

  • DATEVALUE(expression) : Returns a date value for a given text expression.

  • MINUTE(date) : Returns a minute value in the form of a number.

  • HOUR(date) : Returns the hour value in the form of a number.

  • DAY(date) : Returns a day of the month in the form of a number.

  • WEEKDAY(date) : Returns the day of the week for the given date, using 1 for Sunday, 2 for Monday, through 7 for Saturday

  • MONTH(date) : Returns the month, a number from 1 (January) through 12 (December) in number format of a given date

  • YEAR(date) : Returns a year of the date in the form of a number

  • TODAY() : Returns the current date as a date data type

  • NOW() : Returns a date/time representing the current moment

Unit can be "minute", "hour", "day", "month" or "year".

Other Functions

  • APEX(handler, param1, value1, ...) : Call an Apex class and return its value.

PreviousGM - Interaction LoggerNextDataGrid Settings

Last updated 8 months ago

Was this helpful?

πŸ“¦