PDA

View Full Version : Formula / Boolean Statement Trouble in Schedule



brakware
2006-11-21, 06:39 PM
I don't know if this is a bug or something that might have been fixed in 9.x (I am running 8.1), but I am having trouble with logical statements in my schedule.

I am trying to make a planting schedule (some of you may have seen other posts of mine regarding), and it is breaking down as such:

First, I added a series of Yes/No parameters to my areas (I am actually using room boundaries for this) to specify a region type (Type A, Type B, Type C).

Then I am taking the area and calculating percentages of the regions for 5 Gallon pots and 1 Gallon pots. I am breaking this one down to individual pieces. So I have calculations "5 Gallon A," "1 Gallon A," "5 Gallon B," etc. For each of these, the calculation is, for example:

if(Type A, Area / 2, 0)

(assuming that I want 50% of the area to be a particular pot size). For three region types and two pot sizes, that gives me six columns.

After that, I want to make a series of columns for the plants, grouping the pot sizes under the plant heading. To do that, I have attempted to make nested Boolean statements to achieve my results (a column that will list the number of, say, 5 Gallon pots for each region type). For these, the calculation would be, for example:

if(Type A, 5 Gallon A / 2, if(Type B, 5 Gallon B / 3, if(Type C, 5 Gallon C / 4, 0)))

I have used nested Boolean statements before in families and it has worked fine. It should look at the "room," see if it is "Type A," and if it is, make a calculation on "5 Gallon A," if not check to see if it is "Type B," and so on. Instead, it is seeing which one is "Type A" (or whatever the first type is listed in the formula), returning a result for that, and then returning null for the rest. In fact, when troubleshooting it, I typed in:

if(Type A, 2, 1)

and the result was that all of the fields where "Type A" returned true, it set the value at 2 and for all others it returned null. I tried changing it to:

if(Type B, 2, 1)

and it returned a value of 2 where "Type B" returned true, but null for the rest.

Has anyone else had a problem with Boolean statements in schedules? And does anyone have a work-around for this?

Thanks much for any help.

truevis
2006-11-21, 07:20 PM
> if(Type A, 2, 1)

The Yes/No parameter "Type A" really has to be No and not the grey check box or else that Else in the formula returns blank.

brakware
2006-11-21, 07:27 PM
That was it. It all works now. I don't understand, though, why it has to be activated in the schedule. I left the parameters as "no" in the room properties themselves, shouldn't it carry over that value?

Thank you thank you much.

brakware
2006-11-21, 07:53 PM
Okay, now that I have that figured out, does anyone know how to make a grouping name display in the schedule vertically?

I have my two fields for a specific plant (in this case, "Nephrolepis exaltata," or sword fern): a "5gal," and a "1gal." I have grouped "5gal" and "1gal" together and gave it a grouping name of "Nephrolepis exaltata."

In my sheet, though, the "5gal" and 1gal" are displaying vertical (good) but the "Nephrolepis exaltata" is displaying horizontal (bad).

Since "Nephrolepis exaltata" is a group name rather than a column heading, I can't set it to vertical in the schedule properties... is there a way to do it outside of the schedule properties? Or a way to make it show up in the schedule properties?