Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-16
5
Medium Priority
?
1,846 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 400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview

916 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