Launching attachments on web

Help!I have a view that’s visible on the web. Each form has a pdf file attached. Here’s the problem I’m having. If I use the formula below, the link doesn’t work, but if I hardcode in the View ID instead, it’s fine.

Doesn’t work:

<a href="/" + @WebDbName +“/” + @ViewTitle + “/” + @Text(@DocumentUniqueID) + “/$File/” + PDFFileName + “.pdf" target="PDFWindow"> alt="Shift Click to download">” + "

Works fine (only difference is the view id hardcoded):

<a href="/" + @WebDbName +“/” + “8bf0c231794effbb852570cf006f9b5c” + “/” + @Text(@DocumentUniqueID) + “/$File/” + PDFFileName + “.pdf" target="PDFWindow"> alt="Shift Click to download">” + "

I’ve also tried just putting in the text of the viewtitle, but that doesn’t work either. The only thing that works is the actual viewid.

I really really don’t want to hardcode in the view id. any ideas?

Subject: RE: Launching attachments on web

Certain characters are not allowed in a URL. Among them are space.

Subject: Launching attachments on web

Does the view have an alias? If so, then that’s what you should be using. (Use @Subset(@ViewTitle; -1))

Subject: RE: Launching attachments on web

Hey Stan. Thanks. I’ve tried that. Nothing works except putting in the actual viewid. I’m stumped.

Subject: RE: Launching attachments on web

Illegal characters may be the problem (as Andre suggested). The only good way to troubleshoot is to do a View->Source in the browser and see what the actual HREF for the link looks like. Using @URLEncode(“Domino”;@Subset(@ViewTitle;-1)) should beat all of the monsters and gremlins to death, but it would be helpful to know what the actual problem witht the URL was to begin with.

Subject: RE: Launching attachments on web

Ok. I tried that. Here’s what the URL translates to…

https://Web1/Roy/PubSumPDFs.nsf/Summaries/4BA9A371E816D9A8852570C9000A457F/$File/PS-20050922-540290-000014-2005-2.pdf

And it doesn’t work but this one does…

https://Web1/Roy/PubSumPDFs.nsf/8bf0c231794effbb852570cf006f9b5c/4BA9A371E816D9A8852570C9000A457F/$File/PS-20050922-540290-000014-2005-2.pdf

Exactly the same except in one I’ve got the text of the Viewtitle (using your @URLEncode stuff) and in the other I have the Viewid.

Argh.

Subject: RE: Launching attachments on web

Do you have another Design note named “Summaries”? Like a form, page or agent?

Subject: RE: Launching attachments on web

Yes, actually, I have a Form named Summaries which has the view Summaries embedded in it. Do you think it may be getting confused because I have multiple design elements named the same?

Subject: RE: Launching attachments on web

I can guarantee that’s the problem. Unless there’s a query string to disambiguate the call (?OpenForm versus ?OpenView), Domino will grab the document with the lowest NoteID on that particular replica. In this case, that’s likely the form, which makes your full URL invalid. Try typing the URL for the view manually into the browser’s address bar without the ?OpenView and see what happens.

Subject: RE: Launching attachments on web

Thank you very much. This one was a puzzler.

Subject: *Any chance the Summaries view is not accessible from the web?