ConfigParameterTyp

Top 

The type of parameter

Auto

Beas determines whether the parameter is a number or a string depending on the value.

If the value is a number or "0", Beas interprets this parameter as a number.

If the value is empty or not a number, Beas interprets this parameter as a string.

 

Example 1:

Parameter: "color" is "red"

Formula: 'the color is ' || [color]

HANA SQL: select 'the color is' || 'red' -> all ok

 

Formula: 10 + [color]  

SQL: 10 + 'red' -> produce error

 

Example 2:

Parameter: "color" is "5.3"

 

Formula: 'the color is ' || [color]  

HANA SQL: select 'the color is' || 5.3 -> produce error

 

Formula: 10 + [color]  

SQL: 10 + 5.3 -> all ok

 

The evaluation of a formula is always dependent on the contents of the parameter.

All configurations created with beas 9.2 PL 5 Build 32 or older, use parameter type "Auto" as standard.

 

Working with Beas system variables or custom defined variables starting with "e_", the parameter can be interpreted as a string or number. With the following BeasScript setup the type can be permanently defined as string type, if the value is a Beas variable. This must be executed only once per database or client.

setsetup=config_default_e_type=c

String

This parameter type allows a string. If working with formulas, Beas inserts a ‘ (single quotation mark) at the left and right side of the parameter.

If you create a new parameter, the string type is the default option.

 

Example 1:

Parameter: "color" is "red"

Formula: 'the color is ' || [color] (HANA SQL)

MS SQL: select 'the color is' + N'red'

HANA SQL: select 'the color is '  || ' red'

 

Example 2:

Parameter: "color_number" is "5,3"

Formula: '10' + [color_number]

MS SQL: '10' + '5,3' -> all ok

 

Formula: 'the color is ' + [color]

DataWindow Syntax: 'the color is' + 'red'

Number

This parameter type allows numbers only. If the content is not a number, Beas replaces it with “0”. The decimal delimiter is based on what it is defined in the system, but Beas internally replaces it with a decimal point.

 

Example:

Parameter: "color_number" is "5,3" (Regional setting is Germany)

Formula: [color_number] * 3

SQL: 5.3 * 3

 

help-achtung

If you use a parameter both as a string or numeric value, then it is advantageous to specify this directly in the formula.

 

String formula: 'color is ' || [color,dbstring]

Number formula: if [color_number,dbnum] > 10 then 1 else 100 end


Help URL: https://help.beascloud.com/beas202404/index.html?configparametertyp.htm