Manage Learn to apply best practices and optimize your operations.

Get A Handle On Selected Documents Within An Embedded View

Wouldn't it be nice if you could act on selected documents within a forms
embedded view on the web? Here's how I've done it.
First create a button with the following JavaScript on the form with the
embedded view:

// Create a regular expression to retrieve the hostname
// and database from the url
var expPattern = /(.+nsf)./;
var aMatch = location.href.match(expPattern);

if (aMatch != null) {
// Get a handle to the view applet
applView = document.applets.view;

if (applView != null) {
// Wait for the view applet to initialize
while (!applView.isActive()) {};

// Get the view UNID of the currently opened view
var sViewUNID = applView.getViewName();

// Get the document UNID of the currently selected documents
var sDocUNID = applView.getSelectedDocumentsEX();
var sOpenURL
" +sDocUNID+"ActionField=Free%ActionValue=1%"+"View="+sViewUNID+"%";
window.location= (sOpenURL);

What this does is pass a list of all of the selected documents UID's in the
embedded view to the agent which you can then parse out using the
doc.Query_String. I am also passing the view unid in the url, since my use was
to return to a $$ViewTemplate form, however; you can omit this or pass a form

After you process your documents form there uid's in you scripted agent, you
can than print to the original url i.e. Print

this will reload the form with the embedded view, and thus refresh the embedded

The embedded view is a great tool, but is even better when you can access and
process documents within the view, from the back end. I hope someone is able to
use this, it's been very useful for me.

Dig Deeper on Domino Resources - Part 7

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 ...