cancel
Showing results for 
Search instead for 
Did you mean: 

Check if Field Exists (in UDF)?

Former Member
0 Kudos

Dear All,

Kindly help me with this issue -

In UDF, I want to check whether a field exists or not? I know, this can be done using the standard function EXISTS, but due to some other requirements, I can't use the standard function and need to check the existence functionality within the UDF.

Any help / suggestion will be highly appreciated.

-- Abhi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Abhi,

Some methods are given in this thread:

Regards,

---Satish

former_member183910
Participant
0 Kudos

Hi,

you can use this java code,

if("SUPPRESS".equals(ResultList.SUPPRESS)){

result.addValue("1"); //you can put your logic.

}else{

result.addValue("2"); //put your logic here.

}

Thanks,

Sandeep Maurya

Former Member
0 Kudos

Thanks Sandeep and Satish, I will work on this and will let you know if I need any further assistance.

Thanks for your kind help.

-- Abhi

Answers (1)

Answers (1)

Former Member
0 Kudos

if (!a.equalsIgnoreCase(ResultList.SUPPRESS)||(!a.equals("")))// if a!=SUPPRESS or a != blank
{
result.addValue(a);// if field exists then this is executed....put ur code here
}

Hanish John

Edited by: Hanish John on Mar 18, 2010 9:17 PM

Former Member
0 Kudos

Thanks everyone!!

But I resolved the issue in a different way. I used the EXISTS standard function and played around with the value (true / false) coming out of it, in the UDF.

Closing the thread.

-- Abhi