Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Displaying image from related record

Featured Replies

I want to display an image from a related record on my web page, I have the related field on the correct layout and yet I get a broken image icon in my browser?

I have tried a test image in the parent database and it works fine, what am i doing wrong?

this is my code,

[color:"blue"] <IMG SRC="[FMP-Image:Photos_NS1::Photo]" WIDTH="69" HEIGHT="52">

First off, what you are doing wrong is wasting valuable db memory with images which could be stored in a folder and accessed via a memory cheap text string in the db file.

Look in the Sample Files forum for an example of serving images with CDML. Then do yourself a favor and download it and study it. It may prove useful. There are other useful web examples there as well. And they are free.

Also, understand the implications of serving fields containing related data via the www. It has been widely discussed on these forums.

Good luck.

  • Author

thanks for your message-

At the moment the images are stored in the database and it is not convenient for me to change this at the moment. - I will look into this though.

My question was, is it possible to display a related image from a container field? If so, can you tell me if there is anything wrong with my line of code?

"...is it possible to display a related image from a container field?"

"It* has been widely discussed on these forums."

*displaying related data

And if after searching for a thread or two on displaying related data and you cannot find one anywhere, as a developer you can experiment with related data using a simple text string instead of an image. You should get the same results for both.

You could also look at the Sample Files forum for the example I posted within the past month. There may be a clue in there about related data.

Like I said, "It has been widely discussed on these forums."

Have fun,

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.