Many Notes databases make use of categorized views to display data. This appears as a tree with each category as an expanding node. A tag cloud is a method of visualization that shows a bunch of keywords weighted by some value. The keyword appears bigger the higher it's value, and smaller the lower it's value.
This recipe shows you how to take any categorized Notes view and to add it into a composite application with a tag cloud. The tag cloud is used to display category information weighted by the number of documents in each category. Selecting the category in the tag cloud displays just that category in the view. Optionally you can also only apply the weighting based on documents you own. That way you get a tag cloud with customized weighting depending on which categories you participate in.
What you need
(1) You will need a notes URL to a categorized view that you want to display. A Notes URL is kind of cryptic and complicated and not all that easy to create by hand. It's general form is "Notes://<server hint>/<replica id>/<view name>?OpenView". If you know all those details you can fill it in. If not, here is a trick to try.
Open the Composite Application Editor (select a Composite Application and choose Actions->Edit Application). Right click the component palette to the right and select Add Component->NSF Component. In the dialog box click "Browse". Select "View" from the top drop down. Select the database you are interested in. And select the view from the bottom drop down.
Click on OK. This will fill in the add component dialog with the Notes url. Cut and paste this off into a blank copy of Notepad or something. You can use "Notes://CAMDB01/85257337006C8B8E/Components?OpenView" to test with if you are just exploring.
(2) You need the name of the field that contains the keyword. For a standard discussion based database, this is "Categories". But other databases may use other things. While looking at the view in question you can do a right click on a document and select "Properties". The second tab contains a list of the field names and their values. Scroll through this till you find the field you want, and make a note of it. (You can use "OfferingStatus" with the above URL.)
(3) You need the name of the field that contains the name of the author. This is option. If you don't fill this in the "My Documents" button won't appear. You can find the field name via the info box, as above. (You can use "$UpdatedBy" with the above URL.)
1. Drop a Document Viewer component Notes Link onto an empty page.
2. Drop a Notes View to Tag Cloud component Notes Link to form a right hand column.
3. Drop a Tag Cloud component Notes Link in the right column under the Notes View to Tag Cloud.
4. Drop a Constants component Notes Link in the right column under the Tag Cloud.
5. Adjust sizes to fit screen.
1. Constants.Field 1 -> Document Viewer.Show Document
2. Constants.Field 1 -> Notes View to Tag Cloud.URL
3. Notes View to Tag Cloud.TagCloudData -> Tag Cloud.Primary Data
4. Tag Cloud.Focused Entity -> Document Viewer.Column Filter
Advanced Component Properties
(Note: field names are case sensitive.)
1. Constants.field1 = Notes URL to view (1)
2. Notes View to Tag Cloud.field = Field that contains the keyword (2)
3. Notes View to Tag Cloud.authorField = Field that contains the author (3) (optional)
4. TagCloud.drawHeader = false
5. TagCloud.drawFooter = false
6. TagCloud.title = Categories: (or a good label to describe the shown keywords)
How it Works
Processing all starts in the Constants component. The notes URL you place in here gets sent to the Document Viewer and Notes View to Tag Cloud components when the pages is opened, made visible or shown again. The Document View component just loads the url it is given, so that is how the view is displayed. The Notes View to Tag Cloud component does the indexing. It goes through each document in the view and looks for the fields that you set in the Advanced Component Properties settings. It keeps track as it goes and when done, it now has the weighted data. When you click the "All Documents" (or the "My Documents" if you entered in an authorField setting) it broadcasts the weighted information to the tag cloud. The tag cloud displays this graphically. When you then select on a category, it sends this over to the Document Viewer which filters the view being displayed to only show that category.
Sometimes you have to click the blank square that makes up the "Constants" component to fire things off.
Large database can take quite some time to index. Get a cup of tea. The Notes View to Tag Cloud component caches the values though, and only updates them every 8 hours. So it will be quick to do it again if you open it within 8 hours. It will not reflect up to the minute information though. Double clicking the background of the Notes View to Tag Cloud component will force it to reindex.
As noted above, the indexing is slow. A better implementation would be to create an agent in the Notes database. This could run periodically on the server and update the cached information.