4 Replies Latest reply on Jul 9, 2013 4:35 PM by bokenrosie

# Calculated Field Problems

### Title

Calculated Field Problems

### Post

I'm trying to get a count to tell me if guests are coming to an event.
I have a field called RSVP Status and the choices are radio buttons for No, Yes, or Yes+1.
I have a calculated field that I've loaded with the following calculation that does not give me what I want.
I'm looking for it to put either 0, 1, or 2 in the field and I only get a 1 for no so I'm completely lost.

If
(Thursday Dinner RSVP="yes"; Thursday Dinner RSVP Count=1;If(Thursday Dinner RSVP="yes+1"; Thursday Dinner RSVP Count=2;If (Thursday Dinner RSVP="no"; Thursday Dinner RSVP Count=0)
))

Any help would be greatly appreciated.

• ###### 1. Re: Calculated Field Problems

Case ( Thursday Dinner RSVP="yes"; 1 ;
Thursday Dinner RSVP="yes+1"; 2;
0 )

Thursday Dinner RSVP Count=1, by the way, is a boolean expression--an expression that evaluates to either true (1) or false ( 0 ).

• ###### 2. Re: Calculated Field Problems

Thanks so much.

I just stumbled on

If (Saturday Dinner RSVP=  "yes";
1;
If (Saturday Dinner RSVP=  "yes+1";
2;
If (Saturday Dinner RSVP=  "no";
0)))

which seems to work too.  Any reason why case would be better?

Thanks again,
• ###### 3. Re: Calculated Field Problems

Case makes for a simpler expression. That then will be something that will be easier to understand/modify when you revisit this at some point in the future.

• ###### 4. Re: Calculated Field Problems

Thank you for your generosity of time to explain it.  I'll replace what I have.