[Webinar] Streamline your web hosting managementRegister Today


lotus script

Posted on 1999-11-25
Medium Priority
Last Modified: 2013-12-18
I am currently trying to create a script in which I would want to find a field, but my problem is I cant find the method to know the highlighted document in a given view.  What i mean by highlighted document is the document which is enclosed in the box when you go down the view and not the document selected(with a check mark in front)

thanks in advance
Question by:Anselm
  • 2

Accepted Solution

Arunkumar earned 600 total points
ID: 2235943
Hi Anselm,

You dont have that in the script.
Alternatively you can bring the sorted document to the UI.

The document gets opened instead of getting selected.

Or,  if you are sorting multiple documents then you can take a collection, put them in a folder and then open the folder for the user in script so that the collection is available separately for the user.


Expert Comment

ID: 2238143

Since the document is hightlighted then it is treated as a selected document.

If your agent is run on selected documents then it is accessible via the NotesDatabase.UnProcessedDocuments property.

Unless, other documents are selected, in which they will take priority.

If you open the current highlighted document however then you can access it via the scrip UI classes.

@Command([EditDocument]) will open the current highlighted document rather than the selected documents.

You then have access to all the fields in that document via whatever method you need.

@Command([ToolsRunMacro]; "Run once agent using UI classes");

Hope that helps


Expert Comment

ID: 2255499
I would do the following using UI classes
Sub Initialize
dim ws as New NotesUIWorkspace
dim uidoc as NotesUIDocument
dim doc as NotesDocument
dim item as NotesItem
dim stringVal as string

set uidoc=ws.CurrentDocument
if uidoc is nothing then
     msgbox "Please Expand the view
              pane, and try again"
     exit sub
end if
set doc=uidoc.document
set item=doc.getFirstItem("Name of your field")
if item is nothing then
end if

end sub

Now you have the text contained in a field in a string variable and now you can edit it.
When you've processed it and want to reassign the new value to the field do
      Call doc.replaceItemValue("Name of your field", SomeValue)
      Call doc.ComputeWithForm(False,False) do this if you need to comput fields based on the change you made.
      Call doc.Save(True,False,False)

that is all you need.
I think.

Expert Comment

ID: 2255509
If my answer is sufficient deny Arunkumar's answer.

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
Suggested Courses

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question