Display first image from child table record

  • 0
  • 2
  • Question
  • Updated 2 years ago
  • Acknowledged
I have a child table of photos which are URL's pointing to Photos on an external Database.
I can see them when I add them to the Parent Form and all is good. 

The URL is changed to show the image by using a formula text field.
"<img src=" &[Photo URL] & 
">"

However, I want to extract Only the first photo related to each record to use in the Parent Report to show a thumbnail of the first photo.

I have the Minimum Photo Record ID# in the parent table and it shows the link to the record but I dont know how to proceed now to get it to:

A: Show the Image
B: Resize it (i guess I could resize it in the child table and link to that field?)

Any ideas?
Photo of Michael Graham | Insight Global UK

Posted 2 years ago

  • 0
  • 2
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,758 Points 5k badge 2x thumb
I assumed that you have already formula text field on the child table which shows the picture on the child record right?

Are you able to see all the thumbnails on the parent report? if yes then you can create a summary field (i.e minimum - record id or first photo record id#) then, create a custom report in your child table and make a filter that record ID# is equal to (minimum - record id or first photo record id#).

Now, use that custom report in the form element setting in your parent form.

Please let me know if you need further clarification although I haven't tested this solution.

Thanks,
Gaurav
I assumed that you have already formula text field on the child table which shows the picture on the child record right? - Yes, this is the [Property Image] field which uses "<img src=" &[Photo URL] & 
">"

Are you able to see all the thumbnails on the parent report? if yes then you can create a summary field (i.e minimum - record id or first photo record id#) then, create a custom report in your child table and make a filter that record ID# is equal to (minimum - record id or first photo record id#).  - I already have the Minimum Photo Record ID# summary 

I created the child Report.
Then created a Report Link and selected that report on my form.
Bingo!   Thanks Guarav.
ah, that was only half the battle.   I want to show it the the Parent Report and when I add that Report Link field, it just shows me a link with the Min Photo Record ID number on it ??
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,928 Points 50k badge 2x thumb
If you summarize the minimum record ID of the children, you can then do a reverse relationship to float up the [Photo URL] field to the Parent. Make a relationship where 1 child has Many parents based in that summary record ID field.

As for the width, this should work

"
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,928 Points 50k badge 2x thumb
My solution will create an actual field on the Parent
Thanks, Its always that reverse relationship that gets me.   I forgot to choose the Min Photo Record ID when I first did the relationship and it wouldn't let me choose that field later.  Until I created the relationship again.   I'm not going to forget next time.

Thanks Mark :)