If funktion | more as 1 condition

@Douglas Hallo Douglas, may it is possible to have more as 1 condition, this would avoid confusing formulas.

e.g. #S_VH==2?0:#b_Bf_2>0?5:0 (if Style = 2 and 2nd pleat >0 than 5)

option #S_VH==2;#b_Bf_2>0?5:0 ( condition 1; condition 2; …?) both conditions have to be true

Hope this will not take to many effort.

(Btw as I type a condition and the condition is false than is it not possible to use 0,

e.g. A=100 | A==101?0:5 not possible

e.g. A=100 | A>100?0:5 is possible)

1 Like

Hello, @MG2024

The functions is Seamly2D are powered by muParser. You will find a list of the functions here and how to use them.

According to the muParser, the ampersand (&) is the character to use for the AND. Here I’ve tested the AND condition:

The formula is: (#size>2)&&(#Fit>0)?10:5

I hope that this helps you.

@MG2024

Just to add to that… the logical “operators” follow the C++ syntax, where Equal uses ==, AND uses &&, OR uses ||, etc. Common mistake is forgetting and using just one =, | or & and it changes the operation. I’d be lying if I said I’ve never done that in the app code… fortunately the compiler will flag such an error when building the apps.

2 Likes

Perfect, thanks it works.

I found an overview online. This function is not descripted on https://wiki.seamly.io/. Maybe just adding a link to the overview under functions.

1 Like