Helpful Tip for eliminating if() statements

I've recently started using local type 4 prompts with a checkbox for binary operations (on/off - either/or) and then, instead of where I used to reference that prompt with an if() statement, I just multiply by that prompt.

.

For example, I have a wall paneling product with furring and face panels mounted to the furring. I created a local check box prompt, that when checked, the furring is on, and when unchecked the furring is off. This creates a value in the spreadsheet of 1 or 0. So I simply multiply the quantity formula by this prompt, and that way, if the box is checked, it multiplies by one, and the result is the same. If the box is unchecked, it multiplies by 0 and it sets the quantity to 0, no long if statement.

I am able to use this in the Y origin for the face panels as well, since when the furring is off, they need to be pushed back to 0, so I multiply the origin by the prompt.

Now there may be instances where you need the opposite to work, say if you wanted to check a box to turn off the furring instead of turning it on. This would not work because when checked you get a value of 1, but if you multiply by the absolute value of the prompt -1, it will give you the inverse. Example: *ABS(Furring-1).

It is a small improvement, but worthwhile in scenarios like this I think. I'm always looking for ways to simplify.