Welcome!

This community is for professionals and enthusiasts of the Genio platform.
Share your questions and challenges, and help your partners!

2

1
Rodrigo Serafim
On 8/30/19, 3:57 PM

The case you specified (taking into account your comment) is not solvable by a Linked Sum. A Linked Sum calculated a single result, but in your case what you are looking to calculate outputs multiple results. Furthermore, the number of results is not fixed since its dependent on the Gender table, so creating additional field and Linked Sums will not solve it either.

You will have to rely on a more complex pattern called Sum and Create Records (ST).

For this to work you will need an additional table to hold those multiple results that will combine the Country table with the Gender table and will save an output for each combination of those. Lets call it G_C (Genders per country).

  • It will need a foreign key to Country, and another foreign key to Gender, and a numeric field to hold the sum.

  • The People table will also need a foreign key to G_C

  • Then in the numeric field you setup a normal Linked Sum (SR) to count the people [People->1]

  • In the foreign key to the Country you setup a Create Record (ST) to copy the corresponding relation in the Person [Person->CODCNTRY]

  • In the foreign key to the Gender you setup a Create Record (ST) to copy the corresponding relation in the Person [Person->CODGENDER]

With this setup, each time you save a new Person it will check if a row in G_C already exists to hold the sum corresponding to the combination (Country,Gender) and if it doesn't it will create that record. From then on the SR will work as normal.

Its a complex pattern, not used often (a report is more common in these cases) but if you take it step by step its logical to use and to understand.


Keep Informed

About This Community

This platform is for beginners and experts willing to share their Genio knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers. Read Guidelines

Question tools

8 follower(s)

Stats

Asked: 8/30/19, 10:01 AM
Seen: 89 times
Last updated: 9/26/19, 5:03 PM