Jump to content
  • 0

Create multiple line in a single submission


Pascal

Question

Hi. I am working on a timesheet application.

I have employees fill up a time sheet everyday. Each employee enters their ID , and the date. Then they need to enter jobs and times they spent on those jobs. I create 5 fields for potentially 5 different jobs. The employee submits the form once instead of  5 times. That also ensures that the sum of their hours is 8h/day (Simple calculation within the form).

My form creates 1 line with 5 jobs as columns. Some jobs are blank if nothing is entered.

How would I create a table with 1 job per line from that form?

1 job filled up would create 1 line

3 jobs filled up would create 3 lines

....

Thank you !

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hello @Pascal,

From the database best practices point of view, it is not recommended to create 5 fields for jobs. 
You are correct, you need 1 field for that. So, the Table design looks like this:
zqmwjDo.png

However, I am afraid the user should enter the records one by one.
So, the best option is to use a Tabular Report with the Inline Insert option enabled to enter multiple records through one DataPage:

1g1ImQN.png

cDQk0Dp.png

 

If the records should be created automatically, depending on the number of jobs assigned to the user on a specific date, this can be done by a Trigger.
Please provide more details if you need further assistance. 

Link to comment
Share on other sites

  • 0

Thanks for taking the time to answer Cooper!

I just use the basic plan and don't have access to triggered  actions.

Is there a way to create a table that grabs a set column of a table and create a line. Then grabs another set of columns and creates to create the next line?

image.thumb.png.02de7b82852093bdbb87545d9d671654.png

 

 

Link to comment
Share on other sites

  • 0

Hello @Pascal,

I am afraid that Triggers or Tasks are needed to automate the processes, in particular, to insert/update/delete data in the tables automatically.

Since the users fill up a time sheet every day as you mentioned, the Tabular report is an option. 

Have you tested a Tabular Report that is based on the 'Table_Job_Combined' table? Which concerns do you have regarding this approach? 

Link to comment
Share on other sites

  • 0

@Cooper.

Not protected. Supervisors report for their team (Up to 10 Employee ID).

Testing another solution: 

My date comes from a form. I created 5 different reports with identical columns. Hoping I can "merge" the 5 reports into another table or view 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...