Skipi Posted August 16, 2006 Posted August 16, 2006 Hi, I was trying to slove this problem using IF, but I couldn't get it to work. I've found a solution using CASE, but I'd really like to know why the IF statment wouldn't work. I've 4 fields, test 1, value test 1, Test 2 and Value test 2. If either test 1 or value test 1 are empty I want to show graphic 2, otherwise graphic 1. BUT if test 1 is either fail or fail (rust) then test 2 needs to be carried out. So if test 2 and value test 2 are empty then graphic 2 should appear, otherwise graphic 1. I hope this makes sense. Here the CASE that works: Case ( IsEmpty ( ${Summary Test1}) or IsEmpty ( ${Value Test1}) ; Graphic 2 ; ((${Summary Test1} = "fail" or ${Summary Test1} = "fail (rust)" ) and (IsEmpty ( ${Summary Test2}) or IsEmpty ( ${Value Test2})) ); Graphic 2 ; Graphic 1) Here's the IF that doesn't, but it looks like it should. If ( IsEmpty ( ${Summary Test1}) or IsEmpty ( ${Value Test1})) or ( ${Summary Test1} = "fail" or ${Summary Test1} = "fail (rust)" and IsEmpty ( ${Test2}) or IsEmpty ( ${Value Test2} ) ; Graphic 2 ; Graphic 1 ) Any advice why it didn't work would be great. Thanks, Skip
Kent Searight Posted August 16, 2006 Posted August 16, 2006 For starters, dont begin field names with the dollar sign and don't use anything other than alphanumeric characters when naming fields. FYI The "$" is reserved for naming variables. Try renaming your fields before you do anything else.
comment Posted August 16, 2006 Posted August 16, 2006 I am afraid that is incorrect. These are perfectly valid field names - see here.
Kent Searight Posted August 16, 2006 Posted August 16, 2006 Very interesting...I have seen that before but had forgotten about it. Thanks!
Kent Searight Posted August 20, 2006 Posted August 20, 2006 Is this basically what you're looking for? See attached file. Returned_Value.fp7.zip
Recommended Posts
This topic is 6732 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now