PDA

View Full Version : Conditional Length-Is There a Limit?



jeff.richards
2009-11-30, 09:56 PM
All,

Does anyone have an idea if there is a limit to the string length you can put into any conditional statement? This would include things like a limit to the number of nested statements (i.e. the number of IF conditionals that can be nested).

Many thanks,

Alex Page
2009-12-01, 01:19 AM
I havent found one - but I tend to split-up the statement so its easier to read in the dialog box
ie:
a = if....if.....if...
b= if (a....)if....if..

tucker.138678
2009-12-01, 04:19 PM
I have done them that where up to 36 nests. It was not for a length statement, but I would imagine it would still work. The biggest pain is actually getting the parantheses correct. Sometimes I will bring my formulas into Excel or Word to color code the parantheses

jeff.richards
2009-12-01, 06:08 PM
Hmmm, ..., I see your points. Tracking the parenthesis is tough (I actually took it into the visual lisp editior in CAD), and organizing it would definitely help. Still, I can get this code into a formula field, but when I change parameters, only the first two if statemnets are accepted.

Can this be split up in the formula field?

if(and(Stud Load Calculation = 240, Stud Height < 11'), 18, if(and(Stud Load Calculation = 240, not(Stud Height < 11')), 33, if(and(Stud Load Calculation = 240, not(Stud Height < 12' - 0' 6")), 43, if(and(Stud Load Calculation = 360, Stud Height < 9' - 0' 6"), 18, 0))))

Thanks for the responses.