Hi code gurus. I seem to have hit a wall again and I can't see what I am doing wrong.
Some background: I originally made this form without the case conditions and it worked perfectly. I then added the case conditions with L or H adding the L or H to the output and normal results adding nothing. All of the case statements are basically "Case low then, Case high then, else normal" format.
The problem is that it defaults to the "else normal" no matter what I do.
It is kind of unwieldy so I put it on pastebin...
Edit: I just noticed the +'s after my HRET's which I fixed but still no joy.
Ciaran,
I have copied the first CASE statement and see one thing that could be a possible issue. You have a CFMT(WBC) + FMT(WBCUNIT) FMT(L) +FMT(RANGE) .... There appears to be a '+' missing between the WBCUNIT and L format functions. I have bolded / italicized the text below to make it more visible.
-
COND
-
CASE DOCUMENT.WBC < WBC_LOW
-
CFMT(str(DOCUMENT.WBC), "B", "WBC: \t\t","","") + FMT(str(WBCUNIT),"") FMT(" L","B,U") + FMT(WBCRANGE,"") + HRET +
-
CASE DOCUMENT.WBC > WBC_HIGH
-
CFMT(str(DOCUMENT.WBC), "B", "WBC: \t\t","","") + FMT(str(WBCUNIT),"") FMT(" H","B,U") + FMT (WBCRANGE,"") + HRET +
-
CASE (DOCUMENT.WBC < WBC_HIGH) AND (DOCUMENT.WBC > WBC_LOW)
-
CFMT(str(DOCUMENT.WBC), "B", "WBC: \t\t","","") + FMT(str(WBCUNIT),"") + FMT(str(WBC_MARKER) + FMT (WBCRANGE,"") + HRET +
-
ENDCOND
Thanks! Between that and a missing + I got it to work.
It's always a simple little thing isn't it? 🙂