How can one field used multiples times in the same table?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

Hey there, I created one field called "# of Hours" and I wanted to use this field a multiple times for each employee. How can I do that? The employee field is a multi-select field and I need to the "# of Hours"- Field to show up for every employee. How can I implement this? Thanks a lot. 

Photo of Dilan

Dilan

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
When you say that the employee is a multi select field, I assume that you mis-spoke and really mean it is a multiple choice field.

A multi select field, is one when you can choose many choices in the same field  on the same record.

As for your question, when you create a field in QuickBase the field will appear on all records. 




However, perhaps you are really trying to ask how you create a child table where 1 employee has many hour records, such as each child hours record would represent a different day worked?
Photo of Dilan

Dilan

  • 0 Points
Thank you a lot for that quick answer!
The "employee" field is a multiselect field, where I can choose multiple employees for one task.
For example we have 3 employees working on the task "logistics". And now I want to assign the "# of Hours" field for each employee because not every selected employee is working same hours on one task. Hope I could describe it better now.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
Well, that is not a good way to approach it, because you will never be able to associate which employee worked how many hours on each task.

The usual setup is that you would have three tables, Tasks, Employees, and a middle join table called Employee Task Assignments.
1 Task has Many Task Assignments.
1 Employee has Many Task Assignments.

and on the middle Task Assignments table would be selecting the employee, the task and entering how many hours they worked.
Photo of Dilan

Dilan

  • 0 Points
I already have the following tables:
Timecards
Employees
Tasks

And I want to assign the tasks in the timecard table. They are all related. Just don't know how to assign the " # of hours" field to each employee.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
Are your relationships set up the way i suggested?

1 EE has many Time cards
! Task has Many TimeCards?
Photo of Dilan

Dilan

  • 0 Points
Yes exactly like your suggestion.
The "# of hours" - field I created in the Timecards Table and want it to pop up for each employee which is selected in the related multiselect field.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
I do not understand what you mean by the related multi select field.  The field which connects the employees to the time cards is to select a single employee. If you have a relationship where 1 employee has many timecards, then there is no way it can be a multi select field.
Photo of Dilan

Dilan

  • 0 Points
I used the field type "List - User"
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
What more can I say.  I do not believe it's possible to build a relationship using a list use your field as the reference field back to an employee table.

So either you are confused as to which field you're populating on the form compare to which field is actually in the relationship or else you should delete that relationship rebuild it.

Each timecard should only be for a single employee.
Photo of Dilan

Dilan

  • 0 Points
Tasks:                                                         Logistics             Material Distribution
Total Hours Worked on a Task                    Hours                       Hours
Employee1                                                  2                               4
Employee2                                                  3                               5

So this is the form I am trying to implement. And I find it very inefficient to create a timecard for each employee.  Do you think there is another way solving this?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
If you want to be able to know how many hours an employee worked, then yes, you will need to have one timecard per employee.  But these can be entered in a spreadsheet like manner using grid edit, so the data entry can be very fast.
Photo of Dilan

Dilan

  • 0 Points
That would mean I have to create a new app that is is based on that spreadsheet. Or is it possible to create one in the same app?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
No, you do not have to scrap your app and start over.

What I am saying is that you can have an embedded Report Link report on the Task Record, showing the child Time cards,  and set it to be editable in form properties. Then you can do all your data entry on that grid edit report and not have to add the time cards one by one.
Photo of Dilan

Dilan

  • 0 Points
Thank you. In other words, the excel spreadsheet can be linked to the task table? But data will stay in excel ?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
NO. Nothing whatsoever do do with Excel. Please make any table report and then click on Grid Edit. Note that the screen will change to a Grid Edit input area.  You may need some one on one assistance to get your app working.
Photo of Dilan

Dilan

  • 0 Points
Ok, now I got it. Thank you.