on 07-03-2008 11:30 AM
Is it possible to add multiple lines in result.addValue()???
What exactly you want to acheive?
Thanks
Farooq
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
consider for example
if (t == 1)
result.addValue ("Invalid time");
if (d == 1)
result.addValue("Invalid date" );
if (f == 1)
result.addValue("Invalid file type");
if (f == 1 || d == 1 || t == 1 )
gc.setParameter("STATUS" , "1");
when i do this the result contains the value of the first satisfied if condition. In my UDF more than one condition will be satisfied.In that case i have to cocatenate the result of all the satisfyings if's to output.How to do this?
no need for UDF.
You can do this with standard if, concat, constant and equals functions.
e.g. if t equals constant[1] then result = constant[[Invalid time]]. Then concat this to result of d == 1 condition and to that of f == 1 condition and so on.
Finally you have concatenated output of all the conditions. You can use delimitors like comma to separate the concatenated output.
Regards,
Riyaz
Edited by: Riyaz on Jul 3, 2008 4:35 PM
Hi,
You can add as many lines you want.
Note that advanced UDF gets executed only once per context or queue while a simple UDF is called for every occurrence of the source element. addValue method is only supported in in advanced UDF i.e. when working with entire queues or contexts.
Regards,
Riyaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.