1 Reply Latest reply on Sep 30, 2013 5:29 AM by schamblee

# Problem with get thumbnail from relational record

### Title

Problem with get thumbnail from relational record

### Post

Hi everyone,

I am fairly new with filemaker and have a question about a calculation that results in a container.

I am making a database with animal info, importanly in which countries they occur. By checking a value in a checkbox set (get its values from "specify field) this formula gets a photo from the related record:

If (  not IsEmpty ( FilterValues ( GetAsText ( Land ) ; "The Netherlands" ) ) ; GetThumbnail ( Landen::Image ; 800 ; 800 ) )

for each region (46 in total) I have such a calculation

This works as long as only 1 checkbox is checked if more than two are checked than the thumbnails inserted are exactly the same. e.g

If (  not IsEmpty ( FilterValues ( GetAsText ( Land ) ; "The Netherlands" ) ) ; GetThumbnail ( Landen::Image ; 800 ; 800 ) )

If (  not IsEmpty ( FilterValues ( GetAsText ( Land ) ; "Germany" ) ) ; GetThumbnail ( Landen::Image ; 800 ; 800 ) )

If (  not IsEmpty ( FilterValues ( GetAsText ( Land ) ; "France" ) ) ; GetThumbnail ( Landen::Image ; 800 ; 800 ) )

Checking all three in the checkbox set results in three the same thumbnails. Yet I want each to present a unique thumbnail, which is included in the recored with the name "The Netherlands", "Germany" and "France"

I hope I make a bit of sense!

Wiebe

• ###### 1. Re: Problem with get thumbnail from relational record

I would suggest having all pictures and thumbnail in the same related table (Landen::Image).  You would  store the foreign key to each image in the main table.  In your related table you would have a calculation to GetThumbnail to store a thumbnail of the main image.  Then you would use a dropdown list or a popup menu to select the image for each field, which would basically store the idkey for the image in the related table.