Functions

Note:
Currently a limited number of function calls are supported. Functions are not allowed to be used as parameters.
It is not possible to use function calls inside function calls!

 

The following functions are supported:

Name

Description

concat(any,any[,...)

Allows concatenation of two or more properties.

The properties can be:

Number

String

NULL fields

Boolean

Date, DateTime

"text"

Numeric information as 1.234

Placeholder

Functions are not allowed.

 

Example

Item?$select concat(ItemCode," ",IteName," Stock: ",onhand)

 

Note: HANA does not support concatenation of more than 2 strings or combination from different field types. The Beas Service Layer generates SQL HANA syntax automatically, making this possible.

 

Example

With 3 parameters, the system generates the following syntax in the HANA database:

conact(to_alphanum(x),concat(to_alphanum(y),to_alphanum(z))

 

left(field name,number)

Return number characters from the string argument (example: field name) from the left side.

Example

Item("RM")?$select=left(ItemName,5)

right(field name,number)

Return number chars from the string argument (example: field name) from the right side.

Example

Item("RM")?$select=right(ItemName,5)

sum(field name)

Summarize the field. Same as SQL sum()

Note: if you have additional fields, you must work with $groupby.

space(number)

return count of spaces. Use this to create empty fields

Example:

item("RM")?$select ItemCode,space(10) as myUdfField

 

This returns item code and an empty field with the name "myUdfField"

object

boolean(value)

This return a boolean value in the resultSet object

Example:   $select=boolean(false)  

 

In the data store you can see value 0. If you export this to json, it returns false