Formula issue

Formula issue

roscopeco2000
Collaborator Collaborator
2,845 Views
9 Replies
Message 1 of 10

Formula issue

roscopeco2000
Collaborator
Collaborator

Can someone help with this formula i have added a couple of yes/no parameters which feed this if statement. The first lintel type one was working, i now want to add an if statement to say "NA" if i click the lintel not needed parameter. This is what i have so far but its saying unexpected end of expression...

 

if ( and (Structural, "BOX/K-75", "S/K-90", if (and (No lintel needed, "NA" )

 

Also i have a lintel length parameter which reports the length of the lintel depending on the width of the door, is there a way of disabling this if the lintel not need parameter was clicked?

 

Thanks for your help 

0 Likes
Accepted solutions (1)
2,846 Views
9 Replies
Replies (9)
Message 2 of 10

Alfredo_Medina
Mentor
Mentor

I think you need to correct the syntax. Please double check the parenthesis and commas.

 

For IF, is: 

if (condition statement, do this if condition is true, do this if condition is false)

for AND is:

and (this is true, this is true)

 

So, if you want to embed the AND into the IF, copy the AND block and paste it where

'condition statement' was in the IF, like this:

if ( and(this is true, this is true), do this if condition is true, do this if condition is false)

 

Here is some additional information that I found in the Help documents: notice the location of the conditional statements and the "do this if true " and "do this if false" parts of the formulas.

 

The following are sample formulas that use conditional statements.

Simple IF: =IF (Length < 3000mm, 200mm, 300mm)

IF with a text parameter: =IF (Length > 35', “String1”, “String2”)

IF with logical AND: =IF ( AND (x = 1 , y = 2), 8 , 3 )

IF with logical OR: =IF ( OR ( A = 1 , B = 3 ) , 8 , 3 )

Embedded IF statements: =IF ( Length < 35' , 2' 6" , IF ( Length < 45' , 3' , IF ( Length < 55' , 5' , 8' ) ) )

IF with Yes/No condition: =Length > 40 (Note that both the condition and the results are implied.)


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
Message 3 of 10

roscopeco2000
Collaborator
Collaborator

ok so do i need the and if i want to different parameters in one if statement?

0 Likes
Message 4 of 10

Alfredo_Medina
Mentor
Mentor

I don't know. It depends what you need to do. Try to say the formula in plain English first, then put each block of the sentence into the syntax. That should clarify the formula.


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 5 of 10

roscopeco2000
Collaborator
Collaborator

Thanks for your efforts but you have lost me..

0 Likes
Message 6 of 10

roscopeco2000
Collaborator
Collaborator

Let me try to better explain , i have a yes/no parameter which is working fine(structural) I want to add a 3rd option to basically report NA value. So i have created a 2rd yes/no parameter called " Lintel not required" if this box is ticked i want a NA value to be reported. So how can i build this 3rd option into my original lintel ref parameter

cap x.PNGCap y.PNG

 

0 Likes
Message 7 of 10

ToanDN
Consultant
Consultant
Accepted solution
If (No lintel needed, "NA", if (Structural, "Box/K-75", "S/K-90"))
0 Likes
Message 8 of 10

roscopeco2000
Collaborator
Collaborator

perfect mate as ever!!!

0 Likes
Message 9 of 10

roscopeco2000
Collaborator
Collaborator

Toan one more quick question what about if i want the same yes/no parameter to override lintel length with a NA value. I thought the below but keeps coming up inconsistent units, any ideas? 

lintel length.PNG

0 Likes
Message 10 of 10

ToanDN
Consultant
Consultant
You can't output a Length parameter to a text string.
0 Likes