Newbies jerake Posted April 25, 2003 Newbies Posted April 25, 2003 Newbie question, I think... I have two fields - one called "Order Status" with a value list containing two values associated to it, and another field called "Resolution" that is just a plain text field. What I *want* to happen is whenever anyone enters the Resolution field and enters text, after they tab out of it, I want the Order Status field to change value from it's default (Open) to a value of Closed. I'm really having a hard time with this, and have tried several calculations (I've tried Choose, LeftWords, and a dozen different variations of the If statement), none of which has worked. If this is so obvious that it hurts, please forgive me. Any help you can give would be greatly, greatly appreciated, and thanks in advance. Tina
Peter Fenner Posted April 25, 2003 Posted April 25, 2003 Hi Tina Is order status always determined by whether there is text entered in the resolution field or not? And therefore your value list on order status is only for Find purposes? If this is the case then use the IsEmpty function as follows: If(IsEmpty(Resolution Field), "Open", "Closed") What the calculation is doing is saying: If the Resolution Field has nothing in it then return "Open" otherwise return "Closed" Peter
Ugo DI LUCA Posted April 25, 2003 Posted April 25, 2003 Peter, Didn't you just said you'd prefer Case to If forever. Case(not is Empty (RF), "Closed", "Open") would also work fine. If for obscure reasons, you want it to be text and not calc, you could also have it a lookup from this previous calc....
Peter Fenner Posted April 25, 2003 Posted April 25, 2003 Hi Ugo IF is easier to understand than CASE for newcomers to FM. When you are effectively learning a new language the words that sound like your own language are easier (In this case i mean IF). Ofcourse my logic could be very warped. Pete
Ugo DI LUCA Posted April 25, 2003 Posted April 25, 2003 Hi Peter, Agreed, but...you said If this is the case and lately In this case i mean IF Just playing with words.... It seems logical that a Case statement would be used for a Case and an If for a Condition. In my French version of FM, "Case" is translated as "Test" which makes it even more logical. And thanks to the help of some fellows here, I'm currently learning that the Choose function is quite as handy as tha Case for some situation. But of course, I was kidding Peter, and you were right to not confuse him more than he already is.
Peter Fenner Posted April 25, 2003 Posted April 25, 2003 Hi Ugo The choose function? I have never used it. I will go and explore it immediately. And Tina, let us know if you solve your problem. Also don't worry about asking "simple" questions - we all started exactly where you are - but over time you will grasp it - the questions will never go away though - but thats the beauty of Filemaker. And seriously, use this forum a lot - it must be one of the best learning tools available. Good Luck! Peter
Newbies jerake Posted April 25, 2003 Author Newbies Posted April 25, 2003 Hi Peter and Ugo - Wow, thanks for all of the responses! Yes, order status is always determined by whether or not there is text entered in the resolution field, and it is only for Find purposes. Once I made the field a calculation field (!) the formula you provided worked like a charm (and you're right, the If statement makes more sense to me at this point!). I cannot even begin to tell you how many If statements I tried, and I even used IfEmpty in a few of them. I also kept trying to do an Auto-Enter Calculated value, which didn't work too well. But, I guess that's part of the learning process, right? This forum has already been invaluable! Thanks so, so much for all of your help. Tina
Recommended Posts
This topic is 7884 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