I am working on a database to track employees. I’d like to be able to attach a jpg file to the employee document so we have it available for producing ID Cards.
Attaching the file in the client or even the web isn’t an issue, however, if we have the employee record, and the picture file, I figure it would be nice if I also displayed the picture when someone opens the document.
Does anyone know if a way to have an attached picture, and display it on the same document?
This needs to work in the Notes Client - though I would probably also want this to work on the web.
Any advice would be appreciated.
Thanks!
Dave
Subject: Design question on file attachments/rich Text pictures.
Put something like this in the Computed text:
“/”+db+“/VIEW_NAME/”+@Text(@DocumentUniqueID)+“/$file/”+@Subset(@AttachmentNames;-1)+“?OpenElement”
Subject: RE: Design question on file attachments/rich Text pictures.
Will that work for the client? Or is that web page only?
My requirement is Client. Getting it to work on the web is just a bonus…
Thanks!
Subject: RE: Design question on file attachments/rich Text pictures.
you can give it a try.
Moreover it is only a matter of having a handle on the document. Whatever way you are opeing a document on the Client just process that ways:
I guess it is something like this:
Notes://servername/dbname…
try @URLOpen
Subject: Design question on file attachments/rich Text pictures.
IMO the only possibility is to run some code to import the same image that you attach in a separate RT field. It will require the doc to be open in edit mode, so probably you may use custom attachment button that does attaching and then also imports the doc. Or in case the user can just attach file using Notes action button, then you may need to find a way to trigger image import; easiest by providing a separate button for that (as when you replace the attachment, an automated code hooked on some event may not know when to do its job – it will need to identify that the image has changed).
If you attach images on web the approach above will not work and tom import image in RT field in backend may be a bit of pain. So the easiest again is for someone to open the document and click the button to get the image in place.