Jump to content

This topic is 7559 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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

Posted

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

cool.gif

Posted

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

Posted

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

Posted

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

smirk.gif

Posted

Oh, oh. You sure are. blush.gif

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.

smile.gif

Lee

Posted

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.

Posted

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.

grin.gif

Lee

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.