Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


LotusScript for @If(@IsNewDoc & @IsDocBeingSaved; @Subset(@DbLookup("" : "Nocache"; ""; "(CINumber)"; CustomerID; 2); 1) + 1; ConfigID)

Posted on 2004-08-16
Medium Priority
Last Modified: 2013-12-18
Hi, One of my Notes form (Config) has a Numeric field and it has the following formula

@If(@IsNewDoc & @IsDocBeingSaved; @Subset(@DbLookup("" : "Nocache"; ""; "(CINumber)"; CustomerID; 2); 1) + 1; ConfigID).

CINumber view has two columns with sorted descending.

This works fine when the document is saved in Lotus Notes... However, I've a webquery save agent which will create a document for this form when a request is submitted from the web. I want Lotus Script help for this formula

@If(@IsNewDoc & @IsDocBeingSaved; @Subset(@DbLookup("" : "Nocache"; ""; "(CINumber)"; CustomerID; 2); 1) + 1; ConfigID)

Question by:kalios
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 24

Accepted Solution

HemanthaKumar earned 400 total points
ID: 11814483
in your webquerysave agent simply extract the first document and add 1 to it


dim s as New NotesSession
dim db as NotesDatabase
dim view as NotesView
dim nav as NotesViewNavigator
dim note as NotesDocument

set db = s.CurrentDatabase
set view = db.GetView("(CINUMBER)")
set nav = view.CreateViewNav
set note = s.DocumentContext
ConfigID = nav.GetFirstDocument.ColumnValues(1) + 1' Returns 2nd col value

LVL 31

Expert Comment

ID: 11814806
You don't need LotusScript for it.  The same formula will work in both NOtes and on the web.

Author Comment

ID: 11815081
Hemanth, I'll try what you proposed and will let you know.
LVL 19

Expert Comment

ID: 11817569
@IsDocBeingSaved won't work on web and gives error msgs.

So, use LOtus Script for this.

Author Comment

ID: 11825720
Hemanth... works good. thanks

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA:…
Suggested Courses

688 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