?
Solved

Notes doesn't like hide - unhide attachments. Part 2

Posted on 2006-06-01
11
Medium Priority
?
1,460 Views
Last Modified: 2013-12-18
I closed a question yesterday because I thought it's ready.

It's working the right way, I hide the attachment with a subform. If the subform is loaded the attachment is visible otherwise not.

But how surprised I was when I looked through the Form, today and realised that at the bottom of every request there's the attachment as well!!!

The program appends the attachments to the Request Form. The attachment's icon is grey like when I open an Excel 2000 and select File - Send To - Mail recipient. (then the icon will be pasted into a memo and the icon is grey)

I did a big effort to hide the attachment and now, the system append it a second time.
I double checked and the place where the attachment appears at the bottom, there is no field in the designer.

How can I get rid from the unwanted attachment at the bottom?
0
Comment
Question by:didier20
11 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16807439
Let me post my links again:
    http://www-1.ibm.com/support/docview.wss?rs=0&uid=swg21085155
    http://www-1.ibm.com/support/docview.wss?rs=0&uid=swg21099682

From the first one:
In Domino/Notes 4.6 and later, there is an internal field named "$V2AttachmentOptions" that can be added anywhere to the form. If this field has a value of "0" (a text zero), then all V2 Style file attachments will be hidden from Web clients. Notes clients will still be able to see the attachments. The field should be of the type Text and can be Editable, Computed or Computed for Display as desired. Note: If setting this field via a formula or agent be sure that the it is set to a text value of "0", see the Troubleshooting section below for additional details.
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 16807441
Hi didier20,
Does your form have a Body field?
If not, the attachment will appear at the bottom.

You can create the Body field like this:
    Set rti = New NotesRichTextItem( yourDoc, "Body" )

The Notes does not know where to display the attachment.


Hope this helps,
Marko
0
 
LVL 18

Accepted Solution

by:
marilyng earned 260 total points
ID: 16813050
Ok, haven't done this in awhile, so I tested.

Created two subforms, one HasAttachments, the other, NoAttachments

HasAttachments as your editable, rich text field

NoAttachments has
>>>ATTACHMENT HIDDEN<<< (RED, NO HIDE WHEN'S CHECKED)
Section, collapsed for everything.
In the section is your rich text field
Your rich text field make computed, = to itself.

select everything from the line above the section to the line below the section, and check off the Hide when properties..

-------

On your main form, insert the subform based on computed formula.
For test I put a single field, ShowAttachments Yes/No  (Default= "Yes")

---
Create a form, add an attachment.  Save the form, ctrl+s, change the showattachments to No.  Close and reopen.  Attachments gone. (but not from view if you have a column)  But with the Show Attachments, you can also calculate if you want to show the attachment.



0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:didier20
ID: 16815547

sjef,

The first links says following:
"$V2AttachmentOptions field. Right-click the document and select the Document Properties and then the second tab, and then highlight the field in the list."

There's no $V2AttachmentOptions field just these:
$EncryptionStatus
$FILE
$Revisions
$SignatureStatus
$UpdatedBy

The second links (Computed Subform and Controlled Access Section) I tried hours long yesterday.

Computed Subform: I use this and it works but there's the attachment at the bottom.

Controlled Access Section: When I select auto-collapse section for Non Editors, the section is auto-collapsed when the document is opened BUT the non editor can expand it and see the attachment. He can't edit or delete it but he can read it and that's what I want to hinder.
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16815559
didier20,  the $V2AttachmentOptions  only works on WEB clients.

Please try my suggestion, I did test and it does work.
0
 

Author Comment

by:didier20
ID: 16815593
mbonaci,

You've said that Notes does not know where to display the attachment.

But there's the Rich Text Field and Lotus displays the attachment in that field!
But lotus displays a duplicate at the bottom, too!

Where should I create a Body field, on the Form or on the Subform?
Where should I enter the Code  Set rti = New NotesRichTextItem( yourDoc, "Body" )?


0
 
LVL 18

Expert Comment

by:marilyng
ID: 16815725
the section is auto-collapsed when the document is opened BUT the non editor can expand it and see the attachment. He can't edit or delete it but he can read it and that's what I want to hinder<< Hide the section on this subform.  :)
0
 

Author Comment

by:didier20
ID: 16815978
marilyng,
 You wrote:
Create a form, add an attachment.  Save the form, ctrl+s, change the showattachments to No.  Close and reopen.  Attachments gone. (but not from view if you have a column)  But with the Show Attachments, you can also calculate if you want to show the attachment.


Is the ShowAttachments field a dialog list and editable?
But what's the connection between the ShowAttachments field and the attachment?

If I create an editable field with default value "Yes" that doesn't has an effect on the subform if the subform displays the attachment or not.
There should be a formula like
@If(ShowAttachments="No";AttachmentPlace=""";AttachmentPlace";)
or not?

AttachmentPlace is the field on the subform that displays the attachment.
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16818529
Showattachments for my test was a dialog list that I could set to Yes or No.  You can change this to a formula that you calculate whenever you want to change if the attachment appears or not.


The formula for the subform can be based on the showattachments field or some field on your form.  I just told you how to recreate my experiment. :)

The point was:

one subform has the attachment field available, editable with no hide-whens.

The second subform nests the attachment in a closed section, and all the lines of that section, including the rich text field is hidden.  The rich text field in this part is computed with the formula = to itself.

The formula you use to display which variety of the subform is up to you.


0
 

Author Comment

by:didier20
ID: 16840651
I got rid from the attachment at the bottom.

I've a mainform A and this has two subforms B and C (only one subform is displayed at the same time depending on a Formula)
Furthermore, B has two subforms (HasAttachment and HasNotAttachment)

I tested where to place the hidden Section and found that when I create it on the HasNotAttachment subform, the duplicated attachment is still at the bottom.

I placed it at the B subform and the attachment at the bottom was gone.
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16841387
good for you!
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question