Solved

Generate sequential number (web)

Posted on 2004-10-20
2
247 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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