Choose where you’d like to start

Return

Overview

Functions are of two types - one which return a value, and the other which does not.

The return deluge task is used to specify the return value while using a function (which returns a value).  

Note:

  • The return deluge task can be used only if a return type has been specified while creating the function.

Return

When the function is invoked, the value of the expression specified in the return statement will be returned.

Syntax

return <expression>;
ParameterDescription
<expression>

The expression or variable whose value will be returned.

The data-type of the return value should match the data-type defined for the return type. If not, an error will be thrown during runtime.

This task can be used in the following events

When a record is Created
On LoadNo
On ValidateNo
On SuccessNo
On User inputNo
Subform on add rowNo
Subform on delete rowNo
When a record is Created or Edited
On LoadNo
On ValidateNo
On SuccessNo
On User inputNo
Subform on add rowNo
Subform on delete rowNo
When a record is Edited
On LoadNo
On ValidateNo
On SuccessNo
On User inputNo
Subform on add rowNo
Subform on delete rowNo
When a record is Deleted
On ValidateNo
On SuccessNo
Other workflow events
On a scheduled dateNo
During approval processNo
During payment processNo
In a Custom FunctionYes
In an Action item in reportNo

Example

The following function returns the number of days between two given dates

int thisapp.CalculateDays(date sdate, date edate)
{
days = (((edate-sdate)/86400000)).toLong();
return days;
}

Get Started Now

Execute