Client Side Formulas

Tony Coffman -

Client Side Formulas

Client Side Formulas allows you to perform calculations and other functions on data in your View. To access Client Side Formulas, select, and then Right Click on the @VDM option; click “Go to VDM Formulas” from the context menu. Or click on the Home Ribbon Bar and click Formulas.

 

Client Side Formulas

Client Side Formulas requires a Name, Function, Formula and Data Type. All fields referenced in the Formula must also be included in the View.  For most systems the column name will simply be the field name.  Also, no spaces or special characters should be used when creating formulas.

 

Available VDM Formula Functions:

COMPUTE

The COMPUTE method allows you to perform mathematical computations on your data.

The following operators are allowed: <  >  <=  >=  <>  =  IN  LIKE   

The following arithmetic operators are also supported: + (addition)   - (subtraction)   * (multiplication)   / (division)   % (modulus)   

Example: (Field1 * Field2) + (Field3 / Field 4)

 

CONVERT

Converts an expression to a specified Type. The following types are supported: 

System.Boolean, System.Byte, System.Char, System.DateTime, System.Decimal, System.Double,

System.Int32, System.Int64, System.Int16, System.Single, System.String 

Example: CONVERT(expression, type)

 

DATEDIFF

The DATADIFF function allows you to calculate the difference between two dates in number of days, weeks,

months or years. Allowed DateInterval values: DAY, WEEK, MONTH and YEAR.  @Date may be used in pace of the current date. 

Example: DateDiff(DateInterval.Value, Date1, Date2)

 

DATEPART

The DATEPART function allows you to parse a given date

Example:DATEPART(expression,field)

 

IIF

The IIF function returns one of two values depending on the result of an expression. 

Example: IIF(Expression as Boolean, TruePart, FalsePart)

 

ISNULL

The ISNULL function Checks an expression and returns the checked expression or  an alternate value. 

Example: ISNULL(expression, alternatevalue)

 

LEN

The LEN function returns the Length of a string. 

Example: LEN(expression)

 

SUBSTRING

The SUBSTRING function returns the sub-string of a value, starting at a defined point in the string.

Example: SUBSTRING(expression, start, length)

 

TRIM

The TRIM function removed all leading and trailing blank characters like \r, \n, \t, ' '. 

Example: TRIM(expression)

Have more questions? Submit a request

Comments

Powered by Zendesk