Shift list / work plan

Hello,
I am struggling with building of a list of employees shifts.

In the Kalendář table I record a shift - dates of workdays, start time, end time, etc., and people present on a site (input Name - Table link field to Lidi). In the same record I count a value of minutes of the shift with a script and set value via doo.model into a Field number (shiftMinutesHidden). A record = a single day. The shift is usually common for more people.

In the Lidi table I have records od all emplyees with count of all shifts made (Table link field to Kalendář). When I open a record e.g. “Marek” of Lidi, I see list of shifts - all days from Kalendář with checked records only of Marek.

So far excellent.

But now I need to count a SUM of all minutes only of those checked records for all people in Name field from Lidi table to field Hokus.

Something like SQL query SELECT SUM(shiftMinutesHidden) FROM Kalendář WHERE Name LIKE Marek translated to doo.model.

Is something like that even possible?

Thanks in advance for any advise, OS

Screenshot:

Hello Ondrej,

I have a simple solution for you. If you don’t mind that the shiftMinutesHidden field will be displayed as a sum via Link to Table and you will display this sum using the Calculated field.

Settings:
Link to the Kalendář in the Lidi table. Selected field → shiftMinutesHidden as a sum




Change the Hokus fields from Number to a Calculated field and select Kalendar (shiftMinutesHidden) value in the Formula editor.



The result:
You can see the sum of the values of all assigned records with minutes.

Thank you

With kind regards,
Soňa