Solved

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

Posted on 2004-08-16
5
1,799 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
[X]
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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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