February 16, 201510 yr 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
February 16, 201510 yr 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.
February 17, 201510 yr Author Thank for you reply. 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.
February 17, 201510 yr 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]. If you define a self-join relationship of your Gifts table as: Gifts::Kind = Gifts 2::Kind AND Gifts::Offer = Gifts 2::Offer you can then make Count a calculation field (Result is Number, Evaluate from the context of [Gifts]) = Count ( Gifts 2::Kind )
Create an account or sign in to comment