Given that you have 20 fields, you may well do better to move those 20 fields into a related table where you have 20 records with this field instead of 20 different fields.
Using your current structure, you could insert Field1="A" or Field1="B" or Field1="C" inside each pair of parenthesis in your If statement.
You could also use this approach:
If [ PatternCount ( "ABC" ; Field1 ) AND PatternCount ( "ABC" ; Field2 ) AND ... Patterncount ( "ABC" ; Field20 ) ]
PatternCount totally worked—thanks!
I'm not sure that the 20 fields we have could be moved to a separate table due to what they are tracking. However we are new to related tables so I could be wrong.
We're set up with 2 main tables, one for books (where each book is a record) and one for corrections (where each correction is a record related to a book). Then for each correction record that comes in, several different people need to check other components (worksheet, lesson plan...etc) which may also need to be fixed due to the correction that came in.
The 20 fields that repeat in the calculation are for different people to sign off on the components they are responsible for e.g.:
Field1 = Is the worksheet fixed?, Field2 = Is the Lesson Plan fixed?, Field3 = Is the Spanish version fixed?...etc.
We have also discovered that calculations/scripts containing fields from related tables do not always work for IWP users (unless of course we are doing something wrong).
Thanks for all your help,
You could definitely set that up as a related table: the fields you'd use might be defined like this:
BookID (foreign key to book table)
Status (fixed or not fixed, make this a number field with boolean formatting, 1 = fixed )
From the Book Table, Count ( Components::BookID ) = Sum ( Components::status ) would be true only if all listed components have "fixed" as their status.