January 20, 200620 yr I am trying to create a link to files stored in container fields. What I want is for the customer to see the record on the web and be able to click on the "link" to the stored file and have that start downloading. I have worked out what the link is, if I put it in the browser it downloads everytime. I just don't want people to have to cut and paste this into the browser. The link is stored in a calculation field in the database. I currently have this appear on the xml layout for the record. If you need more info let me know, but I think this covers it. Any help?
January 20, 200619 yr Do you already have an XSLT file for display of your record? You can then modify it with: Download
January 26, 200619 yr Author I'm still not sure on this. What should I be putting in "container"? And What is the Xpath? How do I work this out?
January 26, 200619 yr Hmm. You did not answer my question. For custom, dynamic web publishing, you need to have an XSLT file (or use PHP as an alternative). Do you have that? Then I can explain further.
January 28, 200619 yr Ok. Now in the file that should display your download file link, add the two lines I have given before at place where the link should be shown. The XPath is a path that locates the correct element in the XML tree that is returned by the web publishing engine. An example (for the fmresultset grammar) would be: /fmrs:fmresultset/fmrs:resultset/fmrs:record[1]/fmrs:field[@name = 'url_calc']/fmrs:data[1] which addresses the first repetition (fmrs:data[1]) of the field with name url_calc (fmrs:field[@name = 'url_calc']) of the first record (fmrs:record[1]) of the result set you got (fmrs:resultset) within the fmrs:fmresultset root element (fmrs:fmresultset)
January 31, 200619 yr Author So i am looking at something like this: Download It's still not working, i've detailed a bit more on what I am working with below: Database Name: Results Layout Name: Tests Table Name: Tests Field Name: Report (this is where the calculation is stored linking to the container field file) Any more help you can give is much appreciated! I am new to XML and really have no idea about the language.
January 31, 200619 yr Looks like you have forgotten the double-quotes around the argument of the select attribute, and used the wrong field name. It should be like this: Download If you don't succeed, please post the file in question to this thread.
January 31, 200619 yr Newbies I tried the solution and it is only picking up the value from the first record. Is there a way to make the code work on a list of records?
Create an account or sign in to comment