ErnieG Posted August 17, 2003 Posted August 17, 2003 I was trying to refine my database and ran into some kind of blind spot that I hope someone can illuminate. In the detail view of a found record, there had been a thumbnail that was also a link to an optional larger view of the image. Original code: <A HREF="[FMP-linkrecid: layout=dataentry, format=MMZWEB/MMZdetaillarge.html]" target="_blank"> <img src="[FMP-Field: photothumb]" border="0"></A> But I wanted to try having some alternate text appear if there was no image, so I created the whole line through a calculation in the DB. (If photo name field is blank, code is replaced by "Image to come" text.) Then I got a message that "this program does not support the protocol for addressing . . . ." followed by the Linkrecid section, with the %20 for spaces. So I tried the URL version based on my understanding of the CDML reference database. <A HREF="FMPro?-db=MMZoo.fm&-format=MMZWEB/MMZdetaillarge.html&-lay=dataentry&-RecID=[FMP-CurrentRecID]&-Find" target=_blank><img src="MMZWEB/MMZ_artthumb/bogart.jpg" border="0"></A> I feel like I'm SO CLOSE, but I'm missing something about the RecID link. If I remove it from the code above, I get a random larger image. If I leave it in, I get "The specified record was not found." I'll be grateful for any ideas. Ernie
Anatoli Posted August 17, 2003 Posted August 17, 2003 Try [FMP-If: PictureField .neq.] Your picture img code here [FMP-Else] Your TXT here [/FMP-If] For this pictures must be in FM database, which is not the best way, but it works. You can also use only reference to the picture (URL) in txt field and it will work the same way. HTH
ErnieG Posted August 18, 2003 Author Posted August 18, 2003 Great idea, Anatoli. Thank you! Just come at the problem from a slightly different angle. The "photothumb" field in fact already was a URL. Someday I'll have to understand that RecId better, but in the meantime things are working. Thanks again. Ernie
Leb i Sol Posted August 19, 2003 Posted August 19, 2003 the thubm approach...(if it applies). I like to "mark" records as having image or not......this way user loads only 2 images vs. every thumb for every record: ------------------------------ [FMP-record] [FMP-If: Image_field.eq.] <img src="/images/imageNO.gif" width="18" height="18" border="0"> [FMP-Else] <img src="/images/imageOK.gif" width="18" height="18" border="0"> [/FMP-If] <a href="[FMP-LinkRecID: format=ResultDetail.html, layout=web]"> [FMP-field: ItemID] </a> ------------------------------------ looks like: http://mostarnet.com/FM.jpg for whatever is worth.... All the best!
ErnieG Posted August 20, 2003 Author Posted August 20, 2003 Thanks, Leb. I'll take a look at that. But the original question is still puzzling, and I probably didn't state it clearly at all. I had developed a calculation field in the DB that contained EITHER the text "Image to come" OR the following code. <A HREF="[FMP-linkrecid: layout=dataentry, format=MMZWEB/MMZdetaillarge.html]" target="_blank"> <img src="[FMP-Field: photothumb]" border="0"></A> The question is, why would this code work in the HTML page but not, exactly the same, coming out of a FM field. I've gotten <img> and <A HREF> links to work fine, using the "raw" parameter. It seems like the "FMP-linkrecid:" is the only difference. Even though I've got the thing working, I'm still curious about why the original approach didn't work.
Garry Claridge Posted August 20, 2003 Posted August 20, 2003 Try this: [FMP-Field:mycalc,RAW] All the best. Garry
ErnieG Posted August 21, 2003 Author Posted August 21, 2003 Gary, Thanks, but I did add the "raw" parameter (which is how I got the other kinds of links to work). As I say, the only difference was using the "FMP-linkrecid," so maybe it's in there somewhere. Or I could have missed something. Someday I'll try it again, and if the same thing happens I'll do another post. Thank you all. Ernie
Recommended Posts
This topic is 7835 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 accountSign in
Already have an account? Sign in here.
Sign In Now