May 31, 200520 yr [FMP-If:([FMP-CurrentFind][FMP-FindValueItem][/FMP-CurrentFind].Eq.[FMP-Field:Login_Match])] surveyerror.html [FMP-Else][FMP-field:URLLink][/FMP-If] Does not quite work. I am sure I just have the format a little wrong. Any suggestions? Larry
May 31, 200520 yr FMP-CurrentFind does not work with FMP-If, at least not with the CDML that comes with FM4-FM6 (I don't know if it works in Lasso). However, there is a solution with a JavaScript function called GetTerms that I had posted years ago in the fmwebtalk maillist (I think it must have been 2000 or 2001). The name-value pairs of the current find are passed to this function, which parses them and creates a redirect to another page. The GetTerms function must be on the result page. Instead of redirect you could also do something different, e.g. write some HTML code to your page. Feel free to adapt my example to your needs: <html> <head> </head> <body> <SCRIPT LANGUAGE="JavaScript" type="text/javascript"> function GetTerms(dummy) { for (i=0; i<GetTerms.arguments.length-1; ++i) { if (GetTerms.arguments == "issn") var issnval=GetTerms.arguments[i+1]; if (GetTerms.arguments == "year") var yearval=GetTerms.arguments[i+1]; if (GetTerms.arguments == "volume") var volumeval=GetTerms.arguments[i+1]; if (GetTerms.arguments == "issue") var issueval=GetTerms.arguments[i+1]; if (GetTerms.arguments == "firstpage") var firstpageval=GetTerms.arguments[i+1]; } var basestring="FMPro?-db=Serials%20Bestand&-lay=WWW&-format=chemport_result.html&-error=chemport_error.html&-find=search&Serials::ISSN="+issnval; if (yearval > 0) basestring=basestring+"&-op=lte&Jahr_Anfang="+yearval+"&-op=gte&Jahr_Ende="+yearval; if (volumeval > 0) basestring=basestring+"&-op=lte&Volume_Anfang="+volumeval+"&-op=gte&Volume_Ende="+volumeval; basestring=basestring+"&-token.0="; if (volumeval > 0) basestring=basestring+volumeval; if (issueval > 0) basestring=basestring+"("+issueval+")"; if (yearval > 0) basestring=basestring+"("+yearval+")"; if (firstpageval >0) basestring=basestring+",%20"+firstpageval; window.location.href=basestring; } GetTerms([FMP-CurrentFind]"[FMP-FindFieldItem]","[FMP-FindValueItem]",[/FMP-CurrentFind]"last"); </script> </body> </html>
Create an account or sign in to comment