• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

Open PDF as hyperlink from view

I have a Notes database that I created for the web. It consists of a view and a form where the form's attachment is launched when you select a document from the view. I followed the steps in Q_20706565 to do this and it works great. The first column of the view displays "Open PDF" and the second column displays the form name, and when the user clicks Open PDF then the PDf file opens for him. However, I'd like to find out if there is a way to make this look and feel more like a regular web site. In other words can we get rid of the "Open PDF" column and have the form name work like a hyperlink to launch the attachment? Hope I'm being clear, I'm sort of a novice.

Thanks,
Ace

0
achalmers2004
Asked:
achalmers2004
  • 2
  • 2
1 Solution
 
mshogrenCommented:
So you have one column with something like this:

"[<A HREF=/" + @Subset(@DbName;-1) + "/0/" + @Text(@DocumentUniqueID) + "/$File/" + @Subset(@AttachmentNames;1) + ">Open PDF</A>]"

and another with some other formula which evaulates to the form name.

All you need to do is copy the formula from the second column and insert it into the first column formula like this:

"[<A HREF=/" + @Subset(@DbName;-1) + "/0/" + @Text(@DocumentUniqueID) + "/$File/" + @Subset(@AttachmentNames;1) + ">" + @Formula + "</A>]"

Let me know if you have any trouble with the formula as I would be pleaseed to help.  Once you have it working you can get rid of the other column.
0
 
achalmers2004Author Commented:
Yes I could use help with the formula. Currently the column value is the field name and I don't know how to make that into a formula.

Thanks!
0
 
mshogrenCommented:
That is the simplest case, though I can see that it is not intuitive.

Your formula should look like this, though you should replace FieldName with the real name of the field you are using:
"[<A HREF=/" + @Subset(@DbName;-1) + "/0/" + @Text(@DocumentUniqueID) + "/$File/" + @Subset(@AttachmentNames;1) + ">" + FieldName + "</A>]"

0
 
achalmers2004Author Commented:
OMG so simple. Thank you!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now