By a simple drag and drop we drop the icon ''.Conditionalto the desired location in the column ''.Properties''. Or ''Double click'' on the icon ''.Conditional''.


 


The property defined as such allows the use of conditions in properties.

The entry of the command line is done in the field ''.Conditional''. The syntax ''.IFF'' can be used in upper or lower case ''iff''. The character ''|'' is obtained by combining the keys ''Alt Gr'' and ''6''. To recover a property place the character ''.$'' before the property name (case sensitive).

  The type ''Conditional'' must be located in the column ''.Properties'' after the properties it recovers.


Examples

The property ''Finish'' created is to be filled with the following syntax :

IFF($Material=Steel|Polishing|Painting)

If the property ''Materialis equal to ''Steel''.  then the property ''Finish'' will be equal to ''Polishing'' otherwise the property ''Finish'' will be equal to ''Paint''.


The property ''Type Material'' created is to be filled with the following syntax :

IFF($Material=Steel|$Steel|$Other)

If the property ''Materialis equal to ''Steel''. then the property ''Type Material'' will be equal to the property ''SiAcier'' otherwise the property ''Type Material'' will be equal to the property ''Other''.


You also have the possibility of nesting several conditions one after the other. There is no limit!


IFF($Material=Steel|IFF($Material=Alloy Steel|$SteelType|$Other))

The above syntax is not correct because the IFF must always be in the value SINON.


The correct syntax is :

IFF($Material=Steel|$SiSteel|IFF($Material=AlloyedSteel|$TypeSteel|$Other))

- If the property ''Material'' is equal to ''Steel'' then the property ''TypeMaterial'' retrieves the value of the property ''SiAcier''.

Otherwise

- If the property ''Material'' is equal to ''Alloy steel'' then the property ''TypeMaterial'' retrieves the value of the property ''TypeSteel''.

Otherwise

- The property ''TypeMaterial'' Retrieves the value of the property ''Other''.


Concerning conditional equalities, you can use the following syntaxes:

"=" (equal) for text or numeric values.

"<>" (different from) for text or numeric values.

">", ">=", "<", "< =" for numerical values.


It is also possible to use concatenation, by using the '' character&'', in the instructions ''IFF''.

Fraction values are recognized in the instructions ''.IFF''.

Example   - Depending on the value of the property ''Scale'', the property ''Format'' meets the following condition:

IFF($Scale=1/2|$Format=A4|A3)   the value ''1/2'' returns ''0.5''. If the value of the property ''.Scale'' is equal to ''0.5'' then the property ''Format'' will take the value ''A4'' otherwise it will take the value ''A3''.


Possibility to use the wildcard character ''.*'' in conditional operations :

*Steel   to take into account the values ending with the characters  Steel.

Steel   to take into account the values beginning with the characters  Steel.

*Steel*   to take into account the values containing the characters  Steel.