on 09-20-2012 9:22 PM
Hi friends,
we are looking for a functionality to count/increment from the end of the context.
for example,
we want to increment after "005" in this case & start counting further as 006, 007 etc.
Please share your ideas.....
or even some ideas to capture the last number of context/queue would help us to build the logic further.....
Hi Santosh,
Anupam is right. No need to take a For loop.
Logic is very simple. You can check how many times that filed is populated for which you want to display the context of the counter, (No of times the filed exist +1 ) will be your result. You can create an udf and can apply it to any field.
Best Regards,
Sagarika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys,
Below is the udf to do this functionality,
public void Queue_counter(String[] BUZEI, ResultList result, Container container) throws StreamTransformationException{
for (int i=0;i <= BUZEI.length; i++)
{
if (i == BUZEI.length)
{
result.addValue(i);
}
}
}
-santosh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.