[Basic] How to Structure Parent/Child records?

Hey all,

Hoping with a little help to know whether my solution is headed in the right direction. I’m trying to separate records throughout my app - but the Bubble method of record relations is not all that clear to me.

App:
The application is meant to allow users to create a Job/Task and then update the task with outputs/parts completed. Each job runs across three shifts and each shift has multiple outputs.

  • Example
    Job A has 9000 parts that need to be completed across multiple days.
    Job A has a day shift that contributes 1000 parts on Day 1
    Job A has a night shift that contributes 2000 parts on Day 1.
    Total parts complete for Day 1 are 3000 [1000 from shift days and 2000 from shift nights]

The users would like to see the total parts being completed as well as the parts being completed by each shift.

Current Database setup:
Job [Parent Data]
Output Per Day [Child Data]

  • Job Data Type
    Has a connection to Outputs and is set up as a list. The primary field for this is the # of pieces completed to help track how many pieces are done.

  • Output Data type
    Has fields like #of pieces completed, shift, time/date.

I’m able to capture the number of pieces from the child record into the parent record - screenshot is of the parent record showing individual output numbers but not which shift has submitted these.
image

How do I set up the database to show that :
Day 1: Day shift contributed 200 pieces
Day 1: Night Shift contributed 450 pieces
Day 2: Day Shift contributed 100 pieces.
Day 2: Night shift contribution 50 pieces.

Is it another data type I have to include?

Job [Parent] ← Output Per Day [Child] ← Outputs Per Shift [Grand Child]

Or another connection that goes from Child to Parent?
Currently only have Parent to Child as a list.

From how I understand your app, you may want to add Shift as a separate data type. That type would like something like:

Shift
Job (data type: job)
Output (number)

If you want to somehow identify day shifts from night shifts, I’d consider labeling them with a text field or an Option Set.

1 Like