Solved

Generate sequential number (web)

Posted on 2004-10-20
2
248 Views
Last Modified: 2013-12-18
Hi friends,

I have problem here and would appreciate help. I have this Problem Request Call form(for the helpdesk) that should have  a field which auto generates a sequential number in the form of "ABC00001" upon opening the form.
ABC is just a constant string. But I would like to know how to generate the sequential numbers behind it. This number should start from one and increment by 1 with every new document saved. If the form is opened but not saved, the number should not increment.
Thanks in advance for any help!

IT Student
0
Comment
Question by:SadCase
2 Comments
 
LVL 19

Assisted Solution

by:madheeswar
madheeswar earned 20 total points
ID: 12356451
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 30 total points
ID: 12358322
Create a view of teh documents, sorted REVERSE on the field name you are using.  Have a computed field with the following formula:

view := "name of that view";
current := nameOfThisField;
all := @DbColumn("" : "NoCache"; ""; view; 1);
last := @Subset(all;1);
noABC := @Right(lasy; "ABC");
numeric := @TextToNumber(noABC);
newNumber := @If(@IsError(numeric; 1; numeric + 1);
newKey := "ABC" + @Right("0000" + @Text(NewNumber); 5);
@If(@IsNewDoc & @IsDocBeingSaved; newKey; current)
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

Suggested Solutions

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…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

685 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