Expressions

Expressions

An expression is a combination of one or more explicit functions, variables, operators and constants. It is a valid unit of code that can be evaluated to a single value or object.

Types of Expressions

Expression in deluge are classified as follows:

 String Expression

A string expression represents a sequence of characters or text. For example: "abcd" , "zoho" + "platform" + " - online".

strVar="Your contact has been saved";
sendmail
[
To : zoho.adminuserid
From : zoho.adminuserid
Subject : "The feedback you had sent has been incorporated in zohoplatform"
Message : "Comments" + strVar
]

In the above sample,

- The variable zoho.adminuserid returns the emailid of the application owner.
- "Comments" is a string expression.
- "Comments " +strVar is also a string expression.

 Numeric Expression

A numeric expression evaluates to a number such as, floating point (e.g. 4.556 or -5.311) or integer numbers (e.g. -41 , 6243).

English =4.556
Arts=6243
value = (English + Arts) / 2

In the above sample, (English + Arts) / 2 is a numeric expression.

 DateTime Expression

A datetime expression involves operations with calendar terms such as date, time, day, week, etc. You can add or subtract a fixed number of days, week or time from date. The end value of such expression must be a valid date along with time information.

today.getDay()

In the above sample, today returns the current date.

 Boolean Expression

The boolean expressions are conditional expressions that evaluates certain condition and return true or false. The result of a Boolean expression is either true or false.

For example, 2 > 4, 4< 6 && (5%6) > 3.

filters
(
priority
status
"High Priority" : ((priority == "V.High" || priority == "High") && (status == "Open"))
)

 Variables

 Literals or Constants

Literals/Constants refer to fixed values that are written directly and will not be altered during program execution. For example, "Hello world", 4, etc., in which "Hello world" is a string literal and 4 is a numeric literal.

sendmail
[
To : "<example>@zohoplatform.com"
From : zoho.adminuserid
Subject : "The feedback you had sent has been incorporated in zohoplatform"
Message : "Comments"
]

In the above sample,
-The variable zoho.adminuserid returns the email id of the application owner
-"@zohoplatform.com" is a string constant.

Share this post :

FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeveloper.com