December 8, 200025 yr 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
December 9, 200025 yr 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
December 9, 200025 yr 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 function in it, then check to see whether the calc field is "1" if no image, or "0" an image is present.
December 11, 200025 yr 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).]
Create an account or sign in to comment