bottom

Parameters Management Functions

Parameters Management

The GUI of GEDIS Studio allows you to define parameters in the configuration of the generated files, batches and projects. Using that facility you can make your generator more reusable by  adding configuration point to your test data generations. The same generator will be able to produce data with different profiles only by adjusting critical parameters.

This parameters facility is also made available in expressions allowing you to create, update, share temporary parameters during the generation of the records.

The Functions

GET(paramName,default): Read a parameter value

This function returns the value of the parameter whose name is "paramName" or the default value "value" if such a parameter does not exist (and the parameter is created in the field scope).

The parameter is first looked up in the scopre of the field, then the scope of the parent generator and then in the scope of the file definition being generated.

The parameter whose value is returned may have been defined using the SET function or just using the configuration of parameters in the GUI.

SET(paramName,value[,scope]): Update a parameter value

This function allows to create or update the value of the parameter "paramName". The new value of the parameter is "value". Note that the SET function does not return any value.

The third optional parameter is used to set the scope of the parameter:

  • "field" means that the parameter will be available only in the Expression field. Thus, any other fields in the same generator can have a homonym that will not interfer with this one.
  • "generator" means that the parameter is defined in the parent Generator of the expression field. Any other field can refer to the value defined.
  • "file" means that the parameter is made availbale for any field of any generator used to produce data being generated for the current file.

INCR(paramName,value[,echo]): Arithmetic Incrementation of a Parameter

This function allows to update the value of the parameter "paramName" by adding "value" to its numerical value . If the parameter "paramName" does not exist, this parameter is created with the field scope.

Note that the INCR function does not return any value unless the third parameter is defined to the value "true", in that case, the new value of the parameter is echoed.

Add comment


Security code
Refresh