Solved

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

Posted on 2004-08-16
5
1,773 Views
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)

thanks
Kalios
0
Comment
Question by:kalios
5 Comments
 
LVL 24

Accepted Solution

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

eg:

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


~Hemanth
0
 
LVL 31

Expert Comment

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

Author Comment

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

Expert Comment

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

So, use LOtus Script for this.
0
 
LVL 2

Author Comment

by:kalios
ID: 11825720
Hemanth... works good. thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
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.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now