Object-Type "Set-Object"

Production > Product Configurator > Product configurator definition > Configuration structure > Object-Type "Set-Object"

Top  Previous  Next
Expand/Collapse Toggles

A Set-Object (config_Set) is a variable, to which you can assign a value or formula.

Use this for caluclation of variables, which you can use in work order or for visible rules / standard values in other parameter

 

set-object

 

Field

Description

Parameter

Name of the object

You can read the value of the object by name

 

Note: The name must be unique. It's not allowed to use a object name more then one time

Parameter Type

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 Beas script 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 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

 

Area "Default"

Field

Description

Insert Parameter

Displays defined parameters and set-objects.

Script

The  Value

if [ and ] inside the default value, the system see the default value as formula

 

DW Script
SQL formula
JavaScript formula
Java script
VBScript formula
VBScript

 

See Script Syntax

 

When using the SQL formula, database accesses may reduce the performance of the configurator window

 

Note:

select "ItemName" from "OITM"  where "ItemCode"='FP' is not working, because no [ or ] is inside

In this case you can set the complete sql command between [ and ]

[select "ItemName" from "OITM"  where "ItemCode"='FP']

The check button

Check for syntax errors in the entered script.

Flag

flaggreen - Rule is error free

flagyellow - Warning (default)

flagred - Error in rule

Result line

Shows the result of the evaluated formula.

Evaluation of the formula

Shows the evaluated rule with status message.

 

Extended

Field

Description

Bitmap

Select the icon for the specific block. By default, Beas selects a folder icon.

Color

Select a display color for the text of the block name.

 

 


Help URL: https://help.beascloud.com/beas202105/index.html?pk_typ_setzen_obj.htm