Copies giving error

Hello, I’m new here, I have a problem with the settings of each drawer copy, can you help me?

copy is an integer, 0,1,2,3,4 etc
if(copy=0,40,if(copy=1,45,if(copy=2,60,50)))
you can view this read only attribute by clicking on one of the copies and look at its attributes

1 Like

I already tried and the error persists …

Sorry English, I’m using the translator

If the comma is used as a decimal separator, should it be something like the following using a semicolon?

if(copy=0;40;if(copy=1;45;if(copy=2;60,50)))

Using semicolon, error continues

Have you tried commas and then a . for the decimal separator?

I already tested

I stand corrected, I tested 001,002 and they do work as well as just 0,1,2, both original formulas work, the “error” is that the result is not being referenced by the children.

You need to post the file.

@DaveR The use of a semi-colon produces an error, hence the red font, I believe the syntax of DCs are universal. Except for an error if using smart quotes on a Mac. But I would have considered it too.

1 Like

So . instead of , as decimal separator?

1 Like

You can search the function on top of the Component Atttibutes Panel and click the insert button.

This should give the right seperator, for instance
IF(test,ThenValue,ElseValue)

The decimal seperator is indeed universal (“.”)
I am not sure if the arguments seperator is, though

In the given example, the second seperator for the function’s arguments is missing/swapped ( “,” instead of “;”)

1 Like

syntax is important in code, variations are evaluated differently, the use of the semicolon in this case seems to be evaluated as 0. So the red error is in reference to copia, which can not be found, not the semicolon as I first assumed.

1 Like

Really, what was happening, that the copies were not being found,

THANKS! ALL FOR HELP

1 Like