AnsweredAssumed Answered

Cannot get Case Function to work!!!

Question asked by jebber6685 on Jun 2, 2011
Latest reply on Jun 4, 2011 by LaRetta_1

Title

Cannot get Case Function to work!!!

Post

Hello All,

I am trying to get a Case Function to work but it does not and I do not know what is wrong. 

I want FM to return formula 1 if the Sell Date is empty. If not, then I want it to return formula 2. However, I also want FM to return nothing into the field if 2 fields are both empty.

I would think the case would work for this, but I cannot get it to return what I want.

If I try a simple IF Function, I get the right answers but when the Sell Date and the Purchase Date fields are both empty I get a very large number. I am trying to get FM to return nothing if both the Sell Date and Purchase Date fields are empty.

Sounds like a great use for the Case Function, but I cannot get it to work either. If I use the below;

Case ( If ( IsEmpty ( Sell Date ); (Get ( CurrentDate ) - Purchase Date) / 365; (Sell Date - Purchase Date) / 365{ ; If ( IsEmpty ( Sell Date ) and If ( IsEmpty ( Purchase Date ); Investment Time Period: = ""} )

The above gives me "The specific field cannot be found" and it highlights the { just after the 365 that I underlined above.

I would also think that the Default portion of the Case would work, but when I put in this Case Function;

Case ( If ( IsEmpty ( Sell Date ); (Get ( CurrentDate ) - Purchase Date) / 365; {;If ( IsValid ( Sell Date );(Sell Date - Purchase Date) / 365;"Test"})

FM gives the response that same response,  "The specific field cannot be found" and it highlights the { just after the 365 that I underlined above.

Can someone help me? Why will this Case function not work for me????

Any help here would be greatly  appreciated.
I have FMPro Advanced 11.0 v3OS - Windows Vista on desktop, Windows 7 on laptop

Outcomes