Does anyone know if it is possible to add an attachment to the designer of a form. I have a rich text field that I want to default with an attachment, but I don’t know if it is possible.
Any help would be great.
Thanks
Does anyone know if it is possible to add an attachment to the designer of a form. I have a rich text field that I want to default with an attachment, but I don’t know if it is possible.
Any help would be great.
Thanks
Subject: Putting an attachment in the design
You can create a view (called “Parameters”, which is sorted by the document title field (like “Title” or “Subject”)) in your database, which has a document which contains the default RichText content.
On your actual Form, you can then put as default value for the RichText field the formula:
s:=@DbLookup(“”;@DbName;“Parameters”;“YourDocumentTitle”;“Body”);
@If(@IsError(s);“Cannot load default Body content.”;s)
I use this technique often also for other field values, and most of my databases have a “Parameters” view with documents which control the behaviour of the application. One benefit with this method is that you can also let the application owner change the parameters, so you are not always involved as lead programmer to make design changes when users want to have some settings changed in their application. Another great benefit is also that your applications are much easier to convert later on into web applications, as you keep as much settings and content as possible in notes documents instead of design documents.
Subject: RE: Putting an attachment in the design
That worked perfect, I appreciate it. Do you know if there is an easy way to pass the attachment in an auatomated email that gets generated from the document that is holding the form?
Thanks again
Subject: Putting an attachment in the design
Certainly, but be aware that the attachment will “fall” to the document once a document is created/edited with the form. (Makes a difference on the web if you’re constructing your own links.)
Oh, the attachment will be to the Form, then to the document (as a V2 attachment pointed to by a link in the form’s $Body item), not to a particular Rich Text field.