AnsweredAssumed Answered

Calculation help: If a group of fields contain a or b or c, then return result d.

Question asked by ChristineT. on Dec 3, 2010
Latest reply on Dec 3, 2010 by philmodjunk

Title

Calculation help: If a group of fields contain a or b or c, then return result d.

Your post

Hello FileMaker Gurus,

I'm having trouble setting up a long calculation and I now am wondering if a calculation is even the right thing to use.

What we're trying to do:

We have one Status field (StatusField) that we want to automatically change to say "OK!" once a bunch of fields (Field1, Field2...Field20) have been filled in with one of three values (a, b, or c).

I am trying to set up an If statement for each of the 20 fields like so:

If (Field1 contains a, b, or c) AND (Field2 contains a, b, or c) AND (Field3 cotains a, b, or c), ...AND (Field20 contains a, b, or c) THEN StatusField = "OK!"

I am no master of code or syntax so I am having trouble setting up the statements themselves, but I am also wondering if there is an easier way to go about this.

[Aside: I wrote a test calculation using just one of the fields and a Case function, but it doesn't take into account the fact that all the other fields must also contain a, b or c. I've pasted it here as a reference but it may not be relevant: Case ( Field1="A" ; "OK!" ; Field1="B" ; "OK!" ; Field1="C" ; "OK!" )  ]

Thanks

Cool

Christine

Outcomes