on ‎2006 May 17 12:42 PM
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.
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.