Joseph31 Posted May 21, 2004 Posted May 21, 2004 Hello everyone... Heres the situation: Two Fields One in same table Field One: "Dept" Field Two: "Status" All I want is an if statement that goes in the "Dept" field that says...if "Status" is Inactive then I want the "Dept" field change to "Holding" if "Active" then change to "Inhouse Review" Can anyone help me?
Lee Smith Posted May 21, 2004 Posted May 21, 2004 Your example is fuzzy?? Are your fields names Dept and Status, or is that the data in Field one and Field two? I prefer Case over If statements, I find them easier to read and to make work. If the field names are Dept and Status, then this is a calculation for Dept. Right? Case( Stattus ="Inactive", "Holding", Stattus ="Active", "Inhouse Review") HTH Lee
Joseph31 Posted May 21, 2004 Author Posted May 21, 2004 Yes the field names are Dept ans Status... Can you explane this a little more?
Lee Smith Posted May 21, 2004 Posted May 21, 2004 HiJoseph, Sure, Case( Stattus ="Inactive", "Holding", Stattus ="Active", "Inhouse Review") Its saying if the field Status is equalt to Inactive, put Holding in this field. and If it is equal to Active, put Inhouse Review in it. HTH Lee
Joseph31 Posted May 21, 2004 Author Posted May 21, 2004 Thank you for the help...Now I see how to do it... That was easy... I like them better Joseph
Joseph31 Posted May 21, 2004 Author Posted May 21, 2004 One more Question... Can I use this to put the current date into a field if another field is "No"? I have tried the same format you gave me...But I am getting a question mark not a date... I do have a current date cal on the page...So I tired this.... Case( Broker ="No","CurrentDate") This does not work Why? Thank Joseph
Joseph31 Posted May 21, 2004 Author Posted May 21, 2004 One more Question... Can I use this to put the current date into a field if another field is "No"? I have tried the same format you gave me...But I am getting a question mark not a date... I do have a current date cal on the page...So I tired this.... Case( Broker ="No","CurrentDate") This does not work Why? Thanks Joseph
Lee Smith Posted May 21, 2004 Posted May 21, 2004 Hi Joseph, First of all, you need to be sure that you have the right Result "Selected" to fit your calculation. See the box below the calculation box that says "Calculation result is", use the menu beside it to choose from Text, Number, Date, Time, or Container. If the result is to be a Date, be sure that you have selected Date, and if the result is to be a Text, select text. For A date result, Case(Broker= "No", Status(CurrentDate), TextToDate("")) For Text Result Case(Broker= "No", Status(CurrentDate), "") BTW, the ? indicates that something isn't right with the calculation (dates and text for instance), or that the physical size of the field is not large enough to display your result. HTH Lee
Joseph31 Posted May 21, 2004 Author Posted May 21, 2004 Thanks...I will give this a try..I will let you know... Joseph
Joseph31 Posted May 21, 2004 Author Posted May 21, 2004 It Worked..Great... I am FM7 so I had to use Get(CurrentDate)....But it worked perfectly... Thanks a bunch... Joseph
Lee Smith Posted May 21, 2004 Posted May 21, 2004 Oh, oh. You sure are. I'm glad you were able to figure out the new name for Status, as I have no idea what they are. In fact, I have avoided answering questions about 7 just for that reason. However, I'm willing to bet that if I have misled you in any way, someone will be happy to jump in a point you in the right direction. As long as the calculations are working, that make me feel better. Lee
The Shadow Posted May 22, 2004 Posted May 22, 2004 Lee Smith said: I'm glad you were able to figure out the new name for Status, as I have no idea what they are. In fact, I have avoided answering questions about 7 just for that reason. Lee, that's seems like overkill, the big change is that Status() is now called Get(), a few of the other names have been changed, but mostly minor clarifications. I think most posters could figure out what you mean - if you're concerned, you could add a "PS: For FM7, Status() is now called Get()." to point out the way for them.
Lee Smith Posted May 22, 2004 Posted May 22, 2004 The Shadow said: I think most posters could figure out what you mean - if you're concerned, you could add a "PS: For FM7, Status() is now called Get()." to point out the way for them. Maybe so, but I have noticed a lot of new faces on the Forum since the release of version 7, and that it seemed like an awful lot of them were using FM for the first time. With all of the ado about the changes in 7 being discussed already (even the old hands seem to be struggling with some of the changes), I didn't want to add to that confusion further by suggesting something that was *not* doable in 7 without changing it. Anyway, you make a good point about adding a PS or disclaimer to my posts so I'll use that approach until I upgrade to Developer 7, which won't be until I hit the lottery. Lee
Recommended Posts
This topic is 7559 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