Manage Learn to apply best practices and optimize your operations.

Using URL parms display a single category of a Veiw for a web user

This tip describes how to use URL parms to display a single category of a Veiw for a web user.

One of our larger Notes Applications was being Webified and gradually the number of views started to grow as each notes view had to be WEBified. I was asked was there a way to use the Notes views directly on the web and more importantly use parms passed in the URL to display a Single category from that view.

I looked at several solutions to this problem and came up with a working agent that does the trick.

The agent uses the document.context document to retrieve the Query_String_Decoded(0) property. This contains the part of the URL that is passed to the agent from the first "?" delimiter.

I used this facility to pass several things to the agent.

  1. => The view name that will be used
  2. => The Category to be used
  3. => The Title to give the display

This would give a URL like this Widgets&Yellow Widgets Display

The Query_String_Decoded for this example contains :- ?openagent&MyView&Yellow Widgets&Yellow Widgets Display

Using the evaluate LS function to evaluate the @explode Notes Function this string can be broken down into its constituent bits using the "&" char as a delimited. This returns an array

Url[0] = "Openagent"
Url[1] = "MyView"
Url[2] = "Yellow Widgits"
Url[3] = "Yellow Widgits Display"

Having now got the View Name Url[1]
and the category Url[2]
it is possible to build a View Navigator
based on these values.

I have also in my code allowed for the full view to be displayed by passing *ALL or *all as the Category parm.

Set view = db.GetView(Url(1))
 Url(2) = Ucase(Url(2))
If Url(2)="*ALL" Then
  Set nav = view.CreateViewNav
Set nav = view.CreateViewNavFromCategory( Url(2) )
End If

The ViewNavigator Nav can then be looped around and its values displayed on the screen in an nest of HTML tables.

I used a CSS file to make this display look pretty and to take advantage of a CSS property called DISPLAY. This property when set to INLINE displays the HTML element in its place holder. When set to NONE the complete Element disappears. This is more useful that the VISIBLE css property that still leaves the place holder of the element visible.

Two Javascript Functions then allowed the nested tables to be expanded or contracted by the user clicking on the category header.

Unfortunately this was implimented on the Intranet so I cant show an example of this in action and as the function requires CSS/JS and an AGENT it is too much for the CODE segment below.

If you would like a sample database with a worked example please let me know an I will Email it to you. I can be reached at mcdonaghs@utvinternet.<remove this>com

Please remember to remove the <remove this> from the address !

Rgdz Steve

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...