From Clomosy Docs

A global variable can be created in the project. To create a global variable, parameters must be defined. These parameters can be used in any desired unit within the project.

When the '+' button is clicked in the Parameters tab, a "Add Param" box appears on the page as shown below.

AddParamV1.0.png

1

Param Name

The parameter name is being defined. The parameter has multiple data storage fields: (Value Str, Value Text, Value Integer, Value Float, Value Date).


2

Value Str

It represents the field name where string data for the parameter will be stored.


3

Value Text

It represents the field name where long textual data related to the parameter will be added.


4

Value Integer

It represents the field name where numerical data related to the parameter will be added.


5

Value Float

It represents the field name where decimal numerical data related to the parameter will be added.


6

Value Date

It represents the field name where date data related to the parameter will be added.


7

Add Param

After creating the parameter and adding the desired entries to the respective fields, the parameter addition process is completed by clicking the button to perform the addition.

After the parameter registration process is completed, the GetProjectUserDefParam function is used to access this data. The function definition is as follows:

Example
To use the example, a new parameter should be added as shown below.


var
 firstName,lastName,age,userWeight,dateOfBirth : String;
 
{
 firstName = 
Clomosy.GetProjectUserDefParam('user_information').FieldByName('Value_Str').AsString;
 lastName = 
Clomosy.GetProjectUserDefParam('user_information').FieldByName('Value_Text').AsString;
 age = 
Clomosy.GetProjectUserDefParam('user_information').FieldByName('Value_Integer').AsString;
 userWeight = 
Clomosy.GetProjectUserDefParam('user_information').FieldByName('Value_Float').AsString;
 dateOfBirth =
Clomosy.GetProjectUserDefParam('user_information').FieldByName('Value_Date').AsString;
 
 ShowMessage(firstName);
 ShowMessage(lastName);
 ShowMessage(age);
 ShowMessage(userWeight);
 ShowMessage(dateOfBirth);
}

See Also