Q
Problem solve Get help with specific problems with your technologies, process and projects.

Old auto-generated numbers showing up

I used the code below to generate auto numbers on my form. I tested generating two numbers, and on the third number, the second number still appears. What could have gone wrong?
FIELD casenum := casenum;
x := @DbColumn(Class :
 "NoCache" ; "" : "" ; "Number" ; 1);
y := @If(@Trim(x)="" ; "0" ; 
@Subset(x;-1));
z := @TextToNumber(y) + 1;
a :=@Right("00000" + @Text(z);5);
@SetField("casenum";a)
Thanks in advance.
There are many pitfalls in this approach! This topic was treated in depth in this article on LDD that I commend to you as a good guide in this area.
This was last published in December 2003

Dig Deeper on Lotus Notes Domino Formula Language

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close