Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Generate sequential number (web)

Posted on 2004-10-20
Medium Priority
251 Views
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
[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

LVL 19

Assisted Solution

madheeswar earned 80 total points
ID: 12356451
0

LVL 31

Accepted Solution

qwaletee earned 120 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

Question has a verified solution.

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

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…
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
###### Suggested Courses
Course of the Month6 days, 2 hours left to enroll

#### 688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.