Home > Domino Tips > Developer > Agent > Using URL parms display a single category of a Veiw for a web user
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

AGENT

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


Steve Mcdonagh
09.30.2002
Rating: -2.50- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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.



Code

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

http://my.domino.com/myfile.nsf/Webagent?openagent&MyView&Yellow 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
Else 
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

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Agent
Run or restart Notes/Domino agents via text messages
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
How to export data from a Lotus Notes database to a CSV file
Enable or disable scheduled agents without opening the Lotus Notes database design
Creating custom views in Lotus Notes databases
Editing fields in a Lotus Notes view with Ajax

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts