Introduction and Background
A customer needed to store product packaging pictures and artwork and allow the pictures catalogue to be searched, ie all images that were to do with a certain product had to be displayed. This had to be done in the Notes Client. The resulting images also had to be selectable and then downloaded to the client's machine. Tricky.
When I first saw this, I thought it would be impossible, but I managed to solve it for versions 5 & 6.
I broke this down into 3 problems:
- Display the images in the notes client.
- Add a search facility to only show certain images based on search criteria
- Allow the user to select one or more images and run a notes agent on the image.
Display the images in the Notes Client.
Notes views cannot display rich text or images.
Use Notes custom view icons to solve this: Needed to work in Notes 5 & how do you add resources on the fly anyway?
You can open a "web view" in the client, then you can use your web code in there.
ie write an agent that creates the view you want in a web browser, and then open the web page in the client using a frameset.
To create this I used a trick I found on Notes.net:
Store the URL to be opened in the environment variable “afCustomURL" and create a frameset called “EnviroFS” which has one frame that has a computed URL value of @Environment("afCustomURL").
The frameset is then opened in the Middle frame of the existing frameset.
The hostname needs to be the full hostname.
This actually works on a local database as well using localhost!
Will be added to.
Search facility
To be documented.
Allow user to select documents on the "view" or web page in the client and then run a notes agent on it
I also worked out how to allow the user to select the document/graphics from the "view" and then run a notes action on it using cookies and perweb.nsf and the notes:// functionality. Worked in R5 and R6.
To be documented more!
-Adam Foster
http://AdFos.com