How to add multiple photos to a single column...

How to add multiple photos to a single column?

I will have several Inspection Questions.

For each inspection question, I want to allow the user freedom to take multiple photos.

Yes, I can make a Child Table named photos.

But then, the child table photos is linked to the record (foreign key) not to each question (which is a column in that record).

That is, in a single inspectionโ€ฆ for question 1, key aaaaaa, user takes 5 photos.

They appear on the inline table below question 1.

At table photos, 5 records were created, one for each photo.

key 1111, foreign key aaaaaa key 1112, fk aaaaaa key 1113, fk aaaaaa key 1114, fk aaaaaa key 1115, fk aaaaaa

Then for question

2 of the inspection one, still key aaaaaa (each inspection is a single record), I take two more photos.

At table โ€œphotosโ€, two more records are created. key 1116, fk aaaaaa key 1117, fk aaaaaa

And now the table for both question 1 and question 2 will show all the 7 photos, instead of Question 1 showing from 1 to 5 and Question 2 showing from 6 to 7.

Any way to link records of a child table to a specific column of a specific record?

0 2 561
2 REPLIES 2

At least you can add one related table for one column.

@Aleksi_Alkio Sorry Aleksi. I donยดt understand what you mean.

If you mean having one photo table per column (inspections item), what if you have 40 inspection items?

Should I create 40 photo tables? Wonยดt that be a burden on the system, which will be creating a view for each table, etc?

I was wondering if there isnโ€™t a trick, where somehow the child tableโ€™s FK will be a concatenation of parent table Key+Column name, and then on the parent table, a specific column (checklist item) will show photos only of child table records which have that key?

Or something along those linesโ€ฆ

Top Labels in this Space