How to add ref fields in a row and set initial values?

Hello,

It might be a simple thing but I can’t figure out ‘how to’ of 'what I might do ‘wrong’ So any help will be welcome. There are two questoins I have.

Question 1.
In the table ‘timeregistration’ I have several fields of the ref type that refer to an other table which provide the time (type=duration) they can select.
To be more specific:

In the table ‘timesheet’ a user can registrate time for:
Intake,
Consulting,
Reporting.

These field are of type = ref.
The reference table is ‘timeunits’ (read-only) and has a column ‘time’ of type = duration. Is it like:
000:00:00
000:15:00
000:30:00
etcetera.

So users can only select one of those times for Intake, Consulting and Reporting.

In the table ‘timesheet’ I also have a field ‘Total time’. This must be the sum of Intake, Consulting and Reporting and being stored in the table ‘timesheet’.

I tried many things (like with SUM / SELECT) but just can’t figure out how to make this work.

Question 2.
I want the initial value of the fields Intake, Consulting and Reporting to be the value of the first row of the column ‘time’ in theref table ‘timeunits’. In this case 000:00:00 .It has as Key number 0.
No luck so far on my attempts.

Kind regards,
Marcel

0 4 1,869
4 REPLIES 4
Top Labels in this Space