Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

UDF for Checking 2 values and building context

$
0
0

Hi,

 

I need to check whether the value in first argument is same as in 2nd Argument, if so then pass that value else add context change.

 

I am using below UDF for the same

 

int i=0,j=0;

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

  for(j=0;j<b.length;j++)

    if(a[i].equals(b[j]))

    result.addValue("He");

      else

    result.addContextChange();

  }

 

A          B

 

123     234

456     456

789

234

678

 

Output should be

 

[]

456

[]

234

[]

 


Appreciate your help.

 

Thanks,

CH..


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>