I am having a difficult time getting something to work with a family. I have two Yes/No parameters if one is checked I want the Total Height Parameter to read a different height parameter. See attached.
If the Middle Shelf On is check I want the Total Height to read the Height parameter. But if the Array Shelving Off is checked I want the Total Height to read the Array Shelving Height parameter.
I can get the Total Height to read one or the other by doing a statement like this if(Middle Shelf On, Height, 0')
I just can't get any further than that without it showing error messages.
Thanks for the help
Solved! Go to Solution.
Solved by CoreyDaun. Go to Solution.
You have to use a nested IF/THEN statement. Which Yes/No Parameter has higher priority?
If "Middle Shelf On" does, then for the formula for "Total Height" use:
if(Middle Shelf On, Height, if(Array Shelving Off, Array Shelving Height, 0'))
If "Array Shelving Off" does, then for the formula for "Total Height" use:
if(Array Shelving Off, Array Shelving Height, if(Middle Shelf On, Height, 0'))
Another issue is: do you really want this parameter to read 0' if neither parameter is checked?
Thank you Thank you,
I was putting the parenthesis in all the wrong places. These work great.
I also changed the 0 to the minimum Height if none are checked.
Thanks again.
Anytime! But for the sake of thoroughness - what if the user has BOTH of the options checked? With the previous formulas, one option or the other will be totally ignored.
OH!!!!! I didn't think of that, and knowing how things work here that will happen more than I thought about.
Is there a trick that if one is checked the other will uncheck itself so this can't occur?
Now my condition statement experience is tossed out the window. LOL
Well, there no way to directly force one to uncheck. If you wanted to always have one of the two options checked, that would be doable. But it is valid to have neither option checked, right?
One method to achieve this is to introduce another Yes/No parameter called "Shelving" and leave the other two there to specify the options. Add a formula to the Array Shelving parameter " not (Middle Shelf On) " to ensure that only one of those is ever checked.
Then, the primary formula will become:
if(and(Shelving, Middle Shelf On), Height, if(and(Shelving, Array Shelving Off), Array Shelving Height, 0'))
Also, why is one of the options label as "ON" and the other as "OFF"? Why not just "Middle Shelf" and "Array Shelving"?
Thanks
I took out the Off and On. That was left over from the older family and I wanted to get it working prior to cleaning it up.
I found if I have both check marks checked the primary option is the default so I am going to leave it as it was.
I really appreciate your help and knowledge.