Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hello All,

I seem to be having a little trouble with the syntax for a case statement. I am looking to set a field as follows;

Tickets::status_paid=

If Tickets::status="Billing"; "Unpaid"

If Tickets::status="Paid Billing" or Tickets::status="Collected"; "Paid"

If Tickets::status="Unavailable"; "?"

Else Tickets::status

I am confused as to where all the brakets and parens go so I keep getting an error when I try to set the calculation. Any help would be greatly appreciated.

Posted

When you have multiple tests, it works better to use Case() than attempting to use If() particularly since you must nest If()s because (natively) they only accept two results).

Try:

Case (

Status = "Billing" ; "Unpaid" ;

Status = "Paid Billing" or Status = "Collected" ; "Paid" ;

Status = "Unavailable" ; "?" ;

Status

)

LaRetta

Posted (edited)

It seems to come up "Unpaid" on all. It looks like it needs some "{}" brackets but I can't figure it out from the example FM gives.

Case ( test1 ; result1 {; test2 ; result2 ; ... ; defaultResult} )

Edited by Guest
Posted (edited)

No it's in the same table. I think I have a case of Friday burn out. I can't see why yours is working and mine isn't. I think I'll call it a day and look at it Monday.

Thank you so much for your help.

Edited by Guest
Posted

Doh!! OK, Definitely a Friday thing. The field I was using to test with was from the wrong table. I'm going home. Lol

Thanks again

This topic is 5716 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.