6 Replies Latest reply on Jun 14, 2010 9:15 AM by mikesmith1949

# Assigning calculation

### Title

Assigning calculation

### Post

Hi I'm new to Filemaker and have just created a database (healthscreening) I have created a section called 'risk factors' where there are several check box buttons. I want to be able to add up the check boxes to create a total score, eg if 5 check boxes are ticked that results in a score of 5 (ie each check box = 1) or if they are not ticked this results in a score of 0, similarily if 3 are ticked this is a score of 3.

I can do it for one check box easily by using the "if is empty field" which assigns it a value of 1 when ticked. But how do I add up all the check boxes to give me a total, can't figure it out!!!

I am using filemaker pro advanced 11.0v.1

• ###### 1. Re: Assigning calculation

Is this one field or 5?

• ###### 2. Re: Assigning calculation

Hi, its five separate fields with a check box (ticked or unticked) next to each field. When ticked I want to assign each field a value of 1 so that ecah tick represents 1, hence if all are ticked the total is 5

• ###### 3. Re: Assigning calculation

Create a Calculation Field and use the ValueCount ( ) function.

so if your field is called "RiskFactors", your "TotalScore" calculation field would be:

ValueCount ( RiskFactors )

• ###### 4. Re: Assigning calculation

Try:

Count ( Field1 ; Field2 ; Field3 ; Field4 ; Field5 )

BTW, if you used a value list of "1", you could simply sum the fields.

• ###### 5. Re: Assigning calculation

Sorry, didn't see the post that you have 5 separate fields.

ValueCount will only work if you create a Value list using the Risk Factors you have.

• ###### 6. Re: Assigning calculation

Found a way; you simply use 'int' and assign a +1 to each box, then create a total score box with a calculation that simply adds up the total. Cool