Production > Variant production > Product configurator > Syntax - robinfeng/beashelp GitHub Wiki

语法


Navigation: Production > Variant production > Product configurator: help-zahnradSyntax No contents entries on this page Contents In formulas, the product configurator uses SQL syntax. Parameters are used in square brackets [ ]. The product configurator "moves" the formula to the SQL server with a 'select' instruction and evaluates the return value.

Example:

a=5 b=6 [a] + [b]

becomes:

select 5+6

and the following value is returned: 11

Conditions can be created with case:

case when [headrest]='Y' then 'Y' else 'N' end

Visibility rules

For visibility rules only the condition is checked

[numberofseats]=2 or [numberofseats]=3

In this case, the statement is select case when [numberofseats]=2 or [numberofseats]=3 then 1 else 0 end or [cushions]='Y'

help-hinweisNote:
For more information on the possible mathematical and logical functions
please consult the SQL database documentation.

help-achtungWarning: The product configurator uses SQL syntax, parameter are enclosed in [ and ]. Conversely, the variant generator in the formula area uses the Sybase DataWindow syntax. Variables do not have to be enclosed within brackets.

Example of the product configurator syntax for visible rules:

MSSQL-Formel [cushions] = 'Y'

JavaScript-Formel [cushions] == 'Y'

JavaScript result = [cushions] == 'Y';

or calculation of the headrest if ([numberofseats] == "2" || [numberofseats] == "3") result=1 else result=-1;

VBScript-Formel [cushions] = "Y"

VBScript if [cushions] = 'Y' then result=1 else result=-1 end if

⚠️ **GitHub.com Fallback** ⚠️