cancel
Showing results for 
Search instead for 
Did you mean: 

How to substitute the nulle value with UDF

Former Member
0 Kudos

I want to substitute the value null by the value 1

I tried to write a UDF checkinng for null and changing it but it is not working

Object object = null;

for(int i=0; i<a.length;i++)

{

object = (Object)a<i>;

if (object==null)

result.addValue("1");

else

result.addValue(a<i>);

}

any help will do

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

any parameter of a UDF is a String. There is no need to do something like.

object = (Object)a<i>;

and it does not make sense to have

if (object==null)

as this can never happen.

you can check

if (a.length == 0)

to see if there are no values in context.

Former Member
0 Kudos

Thanks for the quick replay

It helped to solve the problem

Cheers

Former Member
0 Kudos

If your issue is solved then please close the thread....

Thanks,

Answers (0)