Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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