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

Domino R5 view needs to have a url link (where user is not required to open notes document on web to dowload attached files)

I have a view for user who are considered external and in the view is a filename column.  I don't want to allow them to access the document to download the file.  I need to do a url in that column.  There may be multiple files attached in the document.  I have looked around for a solution.  

I saw this post : Title: file upload
asked by janelow on 02/27/2003 04:30AM EST  
This solution was worth  30 Points and received a grade of A  

I was not able to get that working.  I am using Domino R5 and on the web.  I did do a field in my form called "AttachedFiles" and in this field I put:

"File/" target="_blank" onclick="return openNew(this.href);">http://domino.intranet.ai/teams/matrixlib.nsf/AIChangeLog//frmAIChangeLog/$File/"+@AttachmentNames

I did not see the multiple attachments appear in the AttachedFiles field on my form.  I put it as a computed field. Then when I used the fieldname "AttachedFiles" in my view, I saw nothing.  

What am I doing wrong?  

I have also tried to do this solution:
http://www.martinscott.com/DesignLibrary.nsf/scategory/1B8A83310FF6151385256C08001DF299?opendocument

0
mermaidink
Asked:
mermaidink
  • 7
  • 5
1 Solution
 
mshogrenCommented:
Did you save those documents again after you added the computed field?  If not, and particularly if you don't want to do that you could just put that formula in the column rather than using the extra field.

0
 
Sjef BosmanGroupware ConsultantCommented:
As mshogren suggests, you have to do this in the column itself. Something like the following formula should work (thanks Zvonko!):

    "[" + @If(@Attachments;
            "<A REF=\"/"+ @WebDbName + "/AllDocs/" + @Text(@DocumentUniqueID) + "/$FILE/"+ @AttachmentNames+"\">"+@AttachmentNames + "</A>";
            "") + "]"

By the way, you cannot prevent this way that a Notes specialist opens the document. If you want to do that, you have to block the form from being displayed on the web or you add a form formula to the view.
0
 
mermaidinkAuthor Commented:
Sjef, your link appears in my column.  I also did it another method:

"["+"<A REF=\"/"+"http://domino.intranet.bellnexxia.com/teams/matrixlib.nsf/AIChangeLog/AIChangeLog/"+"$FILE/"+@AttachmentNames+"\">"+@AttachmentNames + "</A>"+ "]"

But I have the same result for both:

The column gives me the two file names which was uploaded to a document.  I still don't get a hyperlink for the two files listed in the column.  

So are you saying there is not other possible way of having a hyperlink in this column that a user can click (and the hyperlink opens to dowload the file as opposed to the opening of the form?  I can't block the form from being displayed because the form is also used by users on the web.    You also mentioned a form formula in the view...what did you mean here?

Thanks,
Anna
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Sjef BosmanGroupware ConsultantCommented:
Ah, could be, that's because of the multiple values. Only one pair of [...] is allowed.

Try this:

    urls:= @If(@Attachments;
            "<A REF=\"/"+ @WebDbName + "/AllDocs/" + @Text(@DocumentUniqueID) + "/$FILE/"+ @AttachmentNames+"\">"+@AttachmentNames + "</A>";
            "");
    "[" + @Implode(urls; "<br>") + "]"
0
 
Sjef BosmanGroupware ConsultantCommented:
In the view, you can specify a form formula. When Notes retrieves the form to display the document, the name resulting from that formula will override the formname in the field Form in the document. So you could have a very simple form saying: Forbidden! and use the name of that form in the view's form formula.
0
 
mermaidinkAuthor Commented:
I'm not following what you are saying.  In my view I have the following selection formula:
SELECT (Form = "AIChangeLog")

Are you saying to create a field in my form called "Form Name" and then put the value "Forbidden!"? I'm not understanding.. This is domino R5.  I have used it for 4 years and done alot of things with R5 but I am stumped.
0
 
mermaidinkAuthor Commented:
So do you put in the view formula?

"Forbidden!"

I have a formName field with default value ="Forbidden!" in the form.

Was that what you meant?
0
 
Sjef BosmanGroupware ConsultantCommented:
No, sorry. Open your view, click in the middle somewhere to display the view's properties in the Objects window (at the left of the formula window at the bottom). You'll see something like:

[]    Thingum (View)
    <> View Selection
    <> Form Formula
    <> Help Request
    <> ...

The Form Formula is the property I was referring to. The View Selection is the formula stuff with "SELECT Form=...", that's correct, and you can force any document in the view to be opened by a specific Form other than the form mentioned in the document itself.
0
 
mermaidinkAuthor Commented:
I am not sure if it is working the right way.  I put "Forbidden!" in the Form Formula section and then I have my View Selection Formula as: SELECT (Form = "AIChangeLog")

I then tested to see what happens:  I went to the view on the web to test it and opened up a link in one of the view columns and then it opened up a My form named "Main Topic) and it had the two attached files in that document which has nothing to do with the original document where it was uploaded.  It's good in any case because I don't want the user to open up my real form and read the info.  How did that work?  I never put forbidden in any form as a nickname?

Is this working the way you were talking about?
0
 
Sjef BosmanGroupware ConsultantCommented:
More or less. Create a form "Forbidden" with only one line like "This document cannot be read", no fields or anything. The only field you might add is a computed field called SaveOptions, with a fixed value of "0". This will prevent that the form can be saved. Then remove the exclamation point at the end of the Form Formula in your view. To really hide the attachments (if you want to), read this page:
    http://www-1.ibm.com/support/docview.wss?rs=0&uid=swg21099682
0
 
Sjef BosmanGroupware ConsultantCommented:
Anyway, this has little to do with your original question, hasn't it? ;)
0
 
mermaidinkAuthor Commented:
Without creating that form "Forbidden", it uses my default form "Main Topic" which came originally with the R5.  This is a great solution.  I don't mind at all.  Now I totally understand.  Thanks so much!!!
0
 
Sjef BosmanGroupware ConsultantCommented:
Thanks for the compliment :)
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!

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