Creating a timesheet

I have an internal website for tracking the jobs in my company. I am trying to set up a timesheet and need some help.

I’ve created a datatype - Timesheet

In that I have the following fields:
Job Name
Value Completed

I tried setting each of those as a list type so there would be the following:

1: User creates a timesheet
2: Each day they add to that timesheet(to each items list) for each job they worked on, if more than one
3: At the end of the week they submit the time sheet and it gets sent to me on the admin side of the website

The main problem I ran into with my setup was:

I have a repeating group(table) as their timesheet. When they click on the “add to timesheet” button, it opens a popup with the related inputs. They enter the info for that day/job, then press a separate add button in the popup to add it to the Timesheet in the database. Then each log, after it’s created, would show up in their list until they send it. Which would then clear it… BUT… When I try to get the table to show the lists of each field type (i.e. hours, jobs, value complete) it shows all the entries in the first row, with each separated by a comma. Instead of each entry in it’s own row.

So, is this not the correct setup for what I’m trying to achieve? or am I missing something?

The images below are what I’m trying to accomplish

I think you should structure your data like below:

This way:

  1. A user can create a timesheet.
  2. User will be redirected to Timesheet editor page (data of this page is Timesheet).
  3. The editor page will have a repeating group that of type TimesheetItem and the source is Current Page's Timesheet.
  4. User will add new TimesheetItems to the Current Page's Timesheet via popup or some other way (like the popup you showed is fine).
  5. Repeating group continues showing the TimesheetItems of the Current Page's Timesheet.
  6. The user can do whatever he wants with the Current Page's Timesheet (send it to an admin etc.)

Would you mind further explaining the database setup?

You should ask more questions so I can explain? I thought it was clear.

Simply, the main different is you don’t set all of these as a list but make them another datatype (hence TimesheetItem) and add this new data type as a list to the Timesheet.

Okay so for the database I have:
Timesheet - List of Timesheets

List of TimesheetItems

Jobname - Job
Hours - Number
Value Completed - Number

So far on the main page I have a group with the repeating group in it(I like to keep it simple and minimal pages for my employees). That’s the first picture in my original post. I have that Timesheet group “type of content” set as “Timesheet”. The repeating group has been set now to TimesheetItem, but when I set the data source for it as Current Page’s(or in this case, group’s) Timesheet, it turns red and needs more info. The options it gives me is “Parent Group’s Timesheet’s TimesheetItem”

I have it set to create a new Timesheet when the user presses the first Add to Timesheet Button(if one is not already created), then when they fill out the info in the popup and press the second button it adds the timesheet items…

That’s where I’m stuck right now. The workflow for step 4. When that button is pressed I have it “Make Changes to Parent Groups Timesheet”, but then the only option to change/add to is TimesheetItem. So how do I add in what the user has typed in the inputs?

So, now that there is a Timesheet in between, you should change the design a little bit too. If you want everything in one page, there should be a repeating group of timesheets (RG1) and in each cell of RG1, there will be another repeating group of timesheetItems (RG2). Something like this:

But as far as I see, you don’t care if users see their old timesheets or not? If this is the case, then you can have the page for only one timesheet. A button might create the timesheet and then the rest will be just a single repeating group and add button.

You need to play a little bit to let everything sink in.

I got it working. Thank you so much for the help. It works exactly like I wanted to! It just took me a little bit to understand how it works and how to set it up

I’ve got it mostly set up, but I’ve run into a problem. What is the best way to set up sending the timesheet to the admin side then deleting it from the user who created it? I currently have it like this:

I have a data type called “Submitted Timesheets” with field of Timesheet - type Timesheet

When the user presses the submit timesheet button it creates a new Submitted Timesheet from the user’s timesheet. Then I have it delete the User’s Timesheet. It shows up on my admin side exactly like I wanted it, but when it deletes their timesheet it deletes the timesheet from my side too. I’ve tried different ways to set it up, but nothing works yet