Forum Academy Marketplace Showcase Pricing Features

Counting based on on related field

Hi,

It is either me or the absurd learning curve I am not able to cope with (which comes back to it being me :wink: ). I am developing in all kind of languages but this tool drives me insane … still, I don’t give up but need help :wink:

Following (I would guess simple) issue, I am having:

I have two tables (Data Types) one being a project table, the other being a milestone table - both are connected via the project_id - shown as follows:

I am trying to do something simple now:

  • showing a repeated group and within that
  • showing some base data for each project: project name, project_id … and … the total number of milestones per project - not too much asked for, I guess :wink:

However, I cannot get my head around how to calculate the total number of milestones. I can easily count all milestones across all projects but I cannot constraint based on the project_id - I get the most-famous red "More … " asking me to add some further “language elements”, just what is being offered does not make much sense, imho.

The “Parent Group” is a group which is based on the type DB_project - exactly the type I am using for the constraint.

What am I doing wrong here?

P.S. And no, I am not planning to use a backend process, just because of performance issues when it comes to showing the data on the screen - such a thing should not be a backend process, should it?

It looks like your query in your search for milestones should just be:
1_project_id=parent group’s DB_Project

Because t_project_id in your DB_milestones table is already of the type “DB_project”. With the way you have built the search in your bottom screenshot, you are trying to get it to search using text, but it is expecting a project data type instead :slight_smile:

1 Like

That was easy and yet I was so blind :wink:

Thanks a lot!

1 Like