Extras – Tech Tip: Dynamic Dates in Westlaw Intranet Links

Susan Charkes is the Systems Librarian for Dechert Price & Rhoads in Philadelphia. Ms. Charkes practiced law in New York City for 7 years before becoming involved in the information professions. She has held positions in technology consulting and electronic publishing, as well as in corporate information services for Warner-Lambert Co. and other organizations. She received a BA in English from The University of Chicago, a JD from Columbia University and an MLS from Rutgers, the State University of New Jersey. Ms. Charkes is Director/Web Manager of the Philadelphia Chapter of Special Libraries Association.

Suppose you want to set up an Intranet link to a Westlaw database in order enable researchers to view the most recent documents published during a time period that is a “rolling window”. The period of time is fixed, but the start date varies depending on when the search is done. For instance, enable researchers to find only documents published within the last 30 days.

Lexis makes it easy to set up a window, using the “relativedate” search term. For example, “relativedate=previous_30_days”. Days, weeks, months and years all may used as parameters. Lexis Intranet Solutions builds this into the form for creating the Research Link.

But if you have worked with Westlaw’s Intranet Toolkit you know that there is no built-in Westlaw syntax to accomplish this. And Westlaw’s own technical support was stumped by the question.

Nonetheless, it can be done! I created some JavaScript code that implements the window by generating the beginning of the window (the relative date) as a date specific, when the link is clicked. Then this date is used as part of the search statement.

The example used here is a search of the NJADR database for notices, etc., published within the last 30/60/90 days. It is set up as a form, allowing the researcher to select a 30-, 60- or 90-day window.

The code is in two parts. The first part defines the necessary JavaScript functions, which you can incorporate into any page, with a little tweaking. Put this into the section.

The only part that is not completely portable here is the surrounding search statement in the definition of the variable "westURL". This is everything other than +theDate+ immediately above. You will have to edit this for each search.

The second part of the code is the link itself, which is a form. You will customize the link text and may also change any of the time periods. Put this form into the section.

New Jersey Dept. of Environmental Protection Notices published in past days

Here is the code used in a form.

Variation:

If you don't need to give researchers a choice, instead want to hard-code in a time period, use the following code instead, which does not use a form; rather it actually generates the initial date every time the page is loaded. (Change the variable numberOfDays to change the window).

In the section:

In the section (here, set up to do the NJADR search in a 30-day window - you'll have to customize your search statement by editing the "begin link" and "complete link" strings):

Here is a page using this link.

There are probably ways to simplify and make this code even more portable. I'd welcome any suggestions. It has been successfully tested on both Netscape 4.7 and IE 5. If I get around to it before West does, I may put together a form that generates this code.

Many thanks to Genie Tyburski, who asked the question that got me started on this project, and whose testing and comments were essential to the finishing of it.

Posted in: Extras, Intranets, Westlaw