Solved

Generate sequential number (web)

Posted on 2004-10-20
2
244 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
Comment Utility
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 30 total points
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
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 video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

17 Experts available now in Live!

Get 1:1 Help Now