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.

field validation before displaying HTML

Featured Replies

Is there anyway to test a field in a database for contents before displaying some HTML code? Example: I am trying to test to see if there is an image in one of my fields before I put a link to that image. Some of my records will have images and others won't and I don't want some of my records to have bad links. I tried doing a boolean test on the field hoping that filemaker would return a true if an image was there and a false if not. That didn't work. I would appreciate any idea. Thanks in advance.

Chris Taylor

The way I do it (which is probably long winded) is to make the field that states the route to the picture have an auto entry of "none" and then put on the page [fmp-if: picturelink.eq.none][fmp-else]<img src="http://www.mydomain.com/pictures/[fmp-field: picturelink]">[/fmp-if]

This shows the picture if you have added a link, and no picture if you haven't.

If you are having the picture in a container field, then I don't know haven't had to think about it, as I found having pictures served this way to the web from filemaker was very slow.

Hope this helps

Simon

Simon is right regarding the use of the [FMP-If] statement. My only improvement is not to use an autoentered field, instead use a calculation field with the IsEmpty%7Boption%7D function in it, then check to see whether the calc field is "1" if no image, or "0" an image is present.

quote:

Originally posted by ctaylor:

Is there anyway to test a field in a database for contents before displaying some HTML code? Example: I am trying to test to see if there is an image in one of my fields before I put a link to that image

Chris Taylor

[FMP-if: picture.neq.] FM image here [FMP-Else]Picture not in databaze.[/FMP-if]

always worked for me.

[This message has been edited by Anatoli (edited December 11, 2000).]

  • Author

Thank you all very much.

Chris

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.