×
Menu
Index

Functions

 

Introduction

Functions are Tools representing pieces of business logic that can be used from several places in your Products. You can call function by using an Assignment. You can build your own libraries with Functions to be used from all of your Configurations.
 

Result value

Functions have a result value that can be filled using the reserved variable #Result.  When you call a Function using an Assignment, the Assignment's value  is copied to #Result. Inside your Function you can read and write this #Result variable end when you leave the Function, the value is copied back to the calling Assignment.
 

Name

If the Name field is filled, you can use the Function as a Calculated Field. The Name will be added to a list with virtual variables that are read-only outside the Function. Every time this values is read the Function will execute and a new value of Name will be calculated. For using this variable it should be prefixed with the # symbol.
 
Example:
Name: CustomAGE
 
Suppose the Function contains this Assignment:
 
#CustomAGE = AGEAT([BirthDay], [RefDay])
 
Each time when you you #CustomAge in your Business Rules the Function with Name = CustomAge will be executed.
 

Description

Description of the Function.
 

Versions

When multiple Versions of this Function are available, another Version can be selected. Which Function will be executed at runtime depends on the Conditions at Configuration level.
 

New version

After clicking New version the above dialogue appears. You can select one of the Version declared at Configuration level. With the Edit button you can view or eventually modify this Version. Using Copy previous version all Tools from the previous version will be copied to the new Version. This way you want have to begin from scratch.
 

Delete version

Using the Delete version button you can remove an instance of a Version. You can't remove the Base Version.
 

Enable exception handling

When checked a node will be placed beneath the Function called Exception handling. This will be the place where the execution will continue after an unhandled exception will occur. See Exception handling.
 

Include

Functions, Validations and Tables kan be stored as a separate file on disk bij clicking the property Include. After this, the filename will be shown in the form.
 
 
The include file is stored in the same location as the source file of the Configuration. When loading the Configuration, SoftRules®  will load include files automatically. Unchecking the property Include will lead to restoring the original situation and the include file will be deleted. Using Include will make it possible to work with a team on one single Configuration.
 

Library function

See Alias.
 

Alias function

See Alias.
 

Select alias

See Alias.