cancel
Showing results for 
Search instead for 
Did you mean: 

Help in UDF-URGENT

former_member207701
Participant
0 Kudos

Hello Experts,

Need help in writing UDF.

I have 2 queus here :

first queue:

here you can see i have 2 entries in the first context , 1 in the second , 1 in the second,2 in 4th context and so on....

Second queue :

here you can see i have 6 entries in the first context , 6 in second , 3 in third and so on...currenlty i have shown this as empty these may have different values

Now my requirement is to generate the third queue by multipling the first queue with second queue according with the context for above input i need something like :

output queue :

1st entry of 1st context of second queue

2nd entry of 1st context of second queue

3rd entry of 1st context of second queue

4th entry of 1st context of second queue

5th entry of 1st context of second queue

6th entry of 1st context of second queue

1st entry of 1st context of second queue

2nd entry of 1st context of second queue

3rd entry of 1st cotext of second queue

4th entry of 1st cotext of second queue

5th entry of 1st cotext of second queue

6th entry of 1st context of second queue

CONTEXTCHANGE

1st entry of  2nd context of second queue

2nd entry of  2nd context of second queue

3rd entry of  2nd context of second queue

4th entry of  2nd context of second queue

5th entry of  2nd context of second queue

6th entry of  2nd context of second queue

Can someone please help me here...




Accepted Solutions (1)

Accepted Solutions (1)

former_member207701
Participant
0 Kudos

guys , please help here urgent..

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Kiran,

Use a context type UDF with two arguments:

inp1 -> first context

inp2 -> second context

Here is the code:


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

     for(int b=0;b<inp2.length;b++){

          result.addValue(inp2[b]);

     }

}

Regards,

Mark

former_member207701
Participant
0 Kudos

Thanks a lot mark

Answers (0)