Unable to edit an attachment

Hello,

i am currently developing a Lotus Notes Database with the Domino Designer and encountered a Problem I wasn’t able to solve.

I hope somebody here can help me with this. I created a Form an put an attachment into it, which should be editable when opening the Form in a Notes Client.

Unfortunately I can’t edit the attachment. When I double klick it, the edit button is disabled. Do i have do change some settings or has any one a solution?

Thank you for your help…

Rico

Subject: You cannot put it into the FORM

Apologies - while the method below will populate RTF’s with the contents of a profile document, Attachments are really stored in $FILE items, not the RTF’s themselves. So this solution will not work in this case.

If it’s in the FORM, the user can’t edit it. Users can’t modify forms.

Instead, I would suggest you do the following.

Store your attachment / template into a document

I create a form called RTF_Defaults with a Text name field, and a RTF that I can put files (or other information in)

Create a view of these forms (RTF) sorted by the Name

Only allow database administrators to see that view (i.e. Hide it)

In your actual form, have a Computed RTF that does a DB Lookup on the view above, and copies the template into the RTF as the document is first created.
e.g. @DbLookup(“”:“Recache”;“”;“RTF”;“Help”;“RTF_Value”;[FailSilent])

From that point on, users can edit the template within each document.

This also allows the owners of the document template to modify it without having the touch the database design.

This is not limited to attachments. I have some databases that copy “Rich Text forms” into documents, which users then can modify as they need.

Subject: Working fine with a Text

Thanks a lot for your reply. I tried to get it running and I can actually insert a Text with @DBLookup, but nothing out of a RTF.

In the online documentation I found the instruction: “You cannot retrieve data from a rich text field using @DbLookup.” When I try to copy something out of a RTF, nothing is displayed in the new Document. How did you get it running?

Subject: Details …

Apologies - while the method below will populate RTF’s with the contents of a profile document, Attachments are really stored in $FILE items, not the RTF’s themselves. So this solution will not work in this case.

This is how my system is set up.

Profile document - Text field for the name, RTF for the data

Profile view - Sorted by name

Data field - RTF (It’s Editable, not computed) with a Default value of …
@DbLookup(“”:“Recache”;“”;“Lookup\RTF”;“Pricing Table”;“RTF_Value”)
… where RTF_Value is the RTF in the profile

This has worked for Notes 6, 7 and 8.

I have a simple working database I will e-mail on request - send a note to grahamr@ca.ibm.com

Subject: what excacly do you want to do?

do you want to edit always the same attachment or shoud the attachment be used as a kind of template?I don’t think that it’s a good way of designing a database. Use document templates (only editable by admins, users might create copies of it) or profiles like Graham proposed.

Otherhise: Did you check the Standard Template “Microsoft Office Library”? There you have the possibility to create Word documents out of templates.

What I mean it that you could eighter detach an attachment from a profile or use a template from a shared drive and modify that code to and create a new document based on that template.

Good luck!

Daniel

Subject: Description

I want to attach a Excel Template to each new Document. The purpose is to have this Document filled out by the creator of the Document. To make sure there is always the same Version of the Document I thought it would be best to put the Excelsheet in each Document as a Template.