# count record with same fields

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

## Recommended Posts

Hello everyone.

How can I set the calculated value of field C to the number of records having field A equal to the value inserted to field A and field B equal to the value inserted to field B?

For instance with the following situation

record 1  =>  A = "house", B = "pay"

record 2  =>  A = "house", B = "win"

record 3  =>  A = "car", B = "pay"

record 4  =>  A = "house", B = "pay"

when I create a new record having  A = "house", B = "pay"  C should automatically be 2 (since record 1 and 4 have the same A, B.

Thanks

##### Share on other sites

Please don't ask abstract questions; more often than not, they lead to the wrong answers. Instead, explain what kind of objects your solution is tracking and what do you need it to do for you. I suspect that once you do that, it will turn out that the real problem here is structural.

##### Share on other sites

Sorry for my question but I feel it is pretty concrete.

I have a table called gifts with 3 fields: kind - offer - count

Kind and offer may have value from a list

the kind list is "house car plane tricycle"

the offer list is "pay win lease"

I wish to automatically calculate the value of count once selected both kind and offer.

Count should be the number of records having the same value of kind and offer.

I have tried to achieve so all the afternoon yesterday but even if this it seems to me a very simple thing I cannot figure out how to make it work.

Thanks everyone for helping solving my issue.

##### Share on other sites

I am afraid you haven't added anything new. I can answer your question as asked, but I have serious doubts if that's the best way to achieve [whatever this is supposed to achieve].

AND

you can then make Count a calculation field (Result is Number, Evaluate from the context of [Gifts]) =

`Count ( Gifts 2::Kind )`
##### Share on other sites

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

## Create an account

Register a new account

• ### Similar Content

• #### FM9 incompatible step in calculation?

By Justin Close,

• 2 replies
• 1,501 views
• #### Filemaker 6 for Mac issue.

By Tumma K,

• (and 4 more)

Tagged with:

• 8 replies
• 3,677 views
• #### FM3 upgrade to FM Pro 5.5 - Windows 8 installation possible?

By MrEddByrnes,

• (and 4 more)

Tagged with:

• 4,496 views
• #### Moving data from fp5 to fp13

By bmill,

• (and 4 more)

Tagged with:

• 2 replies
• 3,018 views
• #### Filemaker 5.5 database will not delete records on-line

By randyinla,

• (and 4 more)

Tagged with:

• 2,615 views
×
×
• Create New...