Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 8282 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

For each record there could be 1-20 images that will be load from a directory.

So if I loaded 3 images into record one's directory (01.jpg, 02.jpg, 03.jpg) I would then set the records image count to 3, and then CDML would generate a list (image1, image2, image3) and each Item would have a url that would load the image.

Can I calculate the string and then use it in the generation of the page?

I know I could do it with a relationship but I am trying to create a single file web solution.

David

Posted

Limit of 20 images you say... Calculation could be:

If (imagecount <= 1, "image1.jpg", "")

If (imagecount <= 2, "image2.jpg", "")

If (imagecount <= 3, "image3.jpg", "")

If (imagecount <= 4, "image4.jpg", "")

...

If (imagecount <= 20, "image20.jpg", "")

That's your basic calculation, but it's not really going to be much good if you want to make the images hot-linked because you'll than have to add a whole heap of html code to the calculation:

If (imagecount <= 4, "<a href=image4.jpg>image4</a>", "")

but then it could start getting complicated if the urls change for each image or whatever. I reckon the related solution is going to be a lot easier to code in CDML.

Posted

Hi,

if you have a separate directory for each record, can I suggest a no-brain workaround.

create your directory with a full set of dummy images already in there, but use a 1x1 pixel gif or jpg.

As you load real images into the directory, the blanks get overwritten because they have the same name. You can deliver all of the images all of the time without showing a broken link and with minimal effect on your layout.

In my image calculation fields, I tend to have the calculation default to delivering 'zero.gif' whenever there's no real image to display.

regards, jeff

This topic is 8282 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.