How can I attach documents from multiple tables but have them all link back to a single record in a single table?

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

For instance. I have a Projects table, Tasks table, and Time Card table with a separate Documents table. I have the relationship from the Documents table back to the Projects table and what I want to happen is if someone attaches a document at the task level, I want it to be linked at the Project level that the task is linked to. Same if a document is attached to a Time Card, I would like ta document to be stored at the Project level that the Time Card is linked to. So basically, no matter what level a new document is added, I want it to be listed on the Project level.

Photo of Chris_MCD

Chris_MCD

  • 0 Points

Posted 4 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 65,422 Points 50k badge 2x thumb
No problem. We will use the magic of a Report Link field.

The trick will be to create a formula numeric field on the documents table which holds the Record ID# of the Project.

For each relationship,may the Task a relationship, bring down the field for [Related Project] and call it [Project Record ID from Task]
So for example the formula on the Documents Table would be like

If(
[Related Task] > 0, [Project Record ID from Task],
[Related Time Card] > 0, [Project Record ID from Time Card],
Etc)

So now you have a field which holds the Project Record ID#

Now, just go back to the Project table and make a new field of Type Report link and configure the left side for the Record ID field if the Project Table and the right side navigate to your formula field on the documents table.

Then just out the Report Link  field in the form and show the documents records as an embedded report.