Skip 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.

Problems with container fields in HTML!

Featured Replies

I made a search page where you select one of the following categories for example A,B or C. Each category includes few businesses. Some of the businesses in the categories have a "banner -image" in their container field. I want the banners to appear on the "search results" page. I used the following CDML TAG (<IMG SRC="FMPro?-DB=mydatabase.fm3&-RecID=[FMP-CurrentRecID]&BANNER=&-Img" X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom> ) The problem is that most of the businesses don't have a banner in their container field so the web browser displays a broken images in the list between the ones that actually work. Are there any ways to prevent those broken image logos? Is there a way to modify the tag so that filemaker skips the empty container fields while processing the list? Thanks.

Put an [FMP-If][FMP-Else][/FMP-IF] on your html page. The IF checks whether the container field is empty (container.neq. ). If the field is NOT empty, display the graphic, ELSE nothing.

If the container.neq. expression refuses to work, create a calculationfield in your database that does the check, then test this check field on the html page.

  • 5 months later...
  • Newbies

alternately, you can create a calculation field which generates the code for your image file automatically:

field value

image url (txt) a.jpg

image src (calc) <img src="a.jpg">

the calculation goes like this:

If( image url = "",

""

,"<img src=""images/" & image url & """>")

this way if you have a value in image url, it will create an image tag and if it has no value, no image tag will be created. obviously substitute "images/" with whatever is your directory structure.

you can also add attributes like border=0, a width and height value (helpful if it is standard, but even that's not necessary)

hope this is helpful. feel free to e-mail me if you have more questions.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.