cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Generating Sequence Number

Former Member
0 Likes
1,045

I am trying to Generate Sequence Number using a user defined function. For some reason it is not working. I got this piece of code from one of the training manuals.

//write your code here

int inc = 1;

Integer seqNo = (Integer)container.getParameter("seqNo");

if (seqNo == null) {

seqNo = new Integer(inc);

}

else {

int number = seqNo.intValue() + inc;

seqNo = new Integer(number);

}

container.setParameter("seqNo",seqNo);

return seqNo.toString();

Any help appreciated.

View Entire Topic
Former Member
0 Likes

Michael

If you want only a sequence number to be attached then you can use the function "Counter" in airthmetic function. Then you can specify the start value and the increment value.

Also can you tell us what for exactly you are using this?

---Satish