# Formula Inconsistency?

Why would these formulas return different answers, technically they should both be calculating {=or(copy=6,copy=7)} right?

The one that draws parameters for the “OR” Funtion from a different cell seems to be broken. I would like to drive these parameters from a separate selection for hiding specific, but kind of random copies.

the first one would seem to return arbitrary result as there is no assignment “=” the second image would be correct, it’s returning is copy = 6 or 7 == true/false, the OR(HIDDENCOPY) is unnecessary unless you are OR’ing it with some other value.

1 Like

The first and second images are identical, except the bottom one shows the formulas used to generate the results.

Test2 is using HIDDENCOPY as the input for the OR function. So its saying =OR(copy=6,copy=7) via the input from HIDDENCOPY. This generates a true result.

Test1 is simply using the text without taking the input from HIDDENCOPY and it works even though both should technically have the same input when the reference is considered. But this one generates a false result.

clear as mud - in example one HIDDENCOPY is “copy=6, copy=7” in #2 its “=parent!style” – not sure how those are equiv…

Parent!style is “copy=6,copy=7”, its rippled down from a parent component selection field.

These are identical images except the bottom one has the formulas shown whereas the top shows the results of those same formulas.

Test 1 shows what the result is from just calling the “Hiddencopy” you can see in image one this results in an output of copy=6,copy=7, therefore “=hiddencopy” is equal to copy=6,copy=7

Test 2 shows hard coded “copy=6,copy=7” returns a true result.

Test 3 shows using Hiddencopy (Which we have determined = copy=6,copy=7) returns a false result.

These formulas should theoretically be identical, but they are returning different answers.

HiddenCopy is just text and will be evaluated as 0 before being passed to HiTest2

Interesting, I didn’t know that’s how it interpreted things. How come it doesn’t show 0 in test1?

because it is a formula by using = and a function or pointing to an attribute like =copy

copy=6, copy=7 is just text
“copy=6, copy=7” is just text
=or(copy=6, copy=7) is a formula, that returns 1 if either is true

I figured out another solution.

If I wanted to hide copy 6 and 7 of an array, I made the parent selector return 6 and 7, just as numbers with or without spaces will work (eg. 6 7), I then used this formula In the hidden box of the main object to be copied [=search(copy1,parentselector)]. I needed to add “copy1” as a field because the standard copy box returns a 3 digit number (eg. 6.0) instead of just 6. So now it searches for copy1 (6) within the parent selection (6 7) if it’s there then it will hide the copy.

a little late but:
Hidden = CHOOSE(testvalue,0,0,0,0,0,1,1,0)
-or-
Hidden = CHOOSE(testvalue,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE)

where test value is either indexed started at 1 or you add testvalue+1 for zero index.
easy to later change which values toggle hidden and then use the Hidden value for other changes (like zeroing out size, rotation, and position to hidden objects don’t shift boundaries or other parts.)

1 Like