on 05-17-2006 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.
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.
Hi,
If your sequence number is for the record number then you can use a built in function called <b>index</b> you can find this under <b>stastics</b>.
It would be fine if you explain you whole scenario, so I can help you better.
Thanks,
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Michael,
Just take H01 as the sender node and change the context of htis node for the whole structure and then map this as input to fucntion index and to your receiver.
Do this for all the fields.
eg.
root
header1
detail1
header2
detail2
header3
detail3
root
Just take detail1-indexreceiver
change context of detail1 to root.
regards
Vijaya
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.