Announcements
Welcome to the Revit Ideas Board! Before posting, please read the helpful tips here. Thank you for your Ideas!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yes/No Null Value Equivalent to No in Conditional Statement

Yes/No Null Value Equivalent to No in Conditional Statement

A huge problem with using a Yes/No boolean parameter in a conditional statement as a calculated value in a project is that null values do not get evaluated as NOT meeting the Yes condition. Therefore, when I have a Yes/No being evalutated in a conditional statement, such as whether or not a Yes/No parameter is checked to determine which room number to report for a door, each checkbox must be explicitly set to checked or unchecked. In the example of the door room number, as doors are added, they default to a null value, and the formula of the conditional statement doesn't treat the null as No when I want the conditional statement to only be true if the checkbox is explicitly checked.

9 Comments
Anonymous
Not applicable

Another option would be acknowledging NULL as a condition in a conditional statement. Where 0=0 is true, and 0=1 is false, have something similar to represent null.

dplumb_BWBR
Advisor

I agree this is a bug and needs to be fixed.

In the meantime, what we've done as a workaround is to use double negatives.

Rather than using

Parameter equals Yes

we use

Parameter does not equal No

That gets you around the "isn't set" value

pieter1
Advisor
senglychau
Contributor

I've tried to use the double negatives in Revit Formula, the double "not" doesn't cut it.

dplumb_BWBR
Advisor

Maybe I should have included an image.

By "double negative", I did not mean (not (not

As I said, we use 

Parameter does not equal No

As in the first filter below

Does Not equal No.PNG

senglychau
Contributor

Thanks, that is a great workaround and Autodesk still need to add the equivalent "does not equal to" to Revit Formula, Conditional Operator. As mentioned, not(not(-)) is not the same

 

j0258169
Advocate

I would like to be able to run a calculated value on a sheet list Yes/No parameter that has not been checked/unchecked, but is null (the default greyed out check). I understand that this value is not Yes and is not No. But I would like to be able to calculate them as Not(Yes) or Not(No), because null would in fact fit both of those statements.

pieter1
Advisor

We often only want to schedule elements that have a value for Mark or Type Mark. The problem now is, that a filter that says

 

Mark does not equal 'empty field' does not really work. Because it looks for 'null' but NOT for empty fields (a field that once had a value but has now been deleted). This is very confusing for most people.

Geoffrey.Jennings
Participant

A suggestion could be to use the same methodology of assigning 'Parameter Default Value' as occurs when you add a shared parameter to a project and assign the parameter to the 'Material' category.  This way each new element would have the default value of 'No' and be unchecked by default.  

Parameter_Default_Value.png

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report