PDA

View Full Version : ABS2007 Property Set Formula Help



stelthorst
2007-03-01, 07:31 PM
I have a property set (Let's call it PS3) that combines two other property sets (PS1 and PS2).

Currently 'None' is an option in both PS1 and PS2. If both property sets have none selected my PS3 now says "None None". What I want to do is look at PS1 and PS2 and if either one of them say 'None' then make PS3 = 'None. My problem is I don't know the code very well. What I want is something like:

If PS1 = "None"
Then RESULT = "None"

ElseIf PS2 = "None"
Then RESULT = "None"

RESULT = PS1 PS2

Please excuse my ignorance on this issue but I'm not sure how to write the formula to achieve the desired results

Thanks in advance for all of your help,

dkoch
2007-03-01, 11:08 PM
I have a property set (Let's call it PS3) that combines two other property sets (PS1 and PS2).

Currently 'None' is an option in both PS1 and PS2. If both property sets have none selected my PS3 now says "None None". What I want to do is look at PS1 and PS2 and if either one of them say 'None' then make PS3 = 'None. My problem is I don't know the code very well. What I want is something like:

If PS1 = "None"
Then RESULT = "None"

ElseIf PS2 = "None"
Then RESULT = "None"

RESULT = PS1 PS2

Please excuse my ignorance on this issue but I'm not sure how to write the formula to achieve the desired results

Thanks in advance for all of your help,
Try this:


If "[PS1]" = "None" or "[PS2]" = "None" Then
RESULT = "None"
Else
RESULT = "[PS1]" & "[PS2]"
End If


Or, if you prefer, this:


If "[PS1]" = "None" Then
RESULT = "None"
Elseif "[PS2]" = "None" Then
RESULT = "None"
Else
RESULT = "[PS1]" & "[PS2]"
End If


More on the syntax of the If statement can be found in this blog article (http://architects-desktop.blogspot.com/2005/07/structureflow-in-formula-properties.html), if you are interested. I did not test any of the above myself, but I think I got the statements right. Post back if there are problems. I also assumed that if the PS1 and PS2 properties are both not "None" that you want to concatenate the values. If that is not the case, you will need to revise the Else statement's RESULT line.

stelthorst
2007-03-01, 11:45 PM
More on the syntax of the If statement can be found in this blog article (http://architects-desktop.blogspot.com/2005/07/structureflow-in-formula-properties.html), if you are interested. I did not test any of the above myself, but I think I got the statements right. Post back if there are problems. I also assumed that if the PS1 and PS2 properties are both not "None" that you want to concatenate the values. If that is not the case, you will need to revise the Else statement's RESULT line.
Thanks David I was missing two minor things in my formula. The EndIF statement and the quotation marks around my property sets. I added those two items and it's working like a charm. I really need to spend some time learning the code. I'm pretty good with formulas in Excel and I tend to try to use that format in my PS codes.

Thanks again for your help. :)