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

Re: Need help on the following udf

$
0
0

Hi Mahesh,

 

Mahesh Kumar wrote:

 

Getting array index out of bound exception. Attached data and udf

You have to take into account that context udfs will execute on a per context basis. Based on your example, Z1EKDP1 has only one context while ContactNo has two. This is what causes the array out of bounds exception. For this you have two solutions:

 

1. Use only one context. This can be done by inserting the remove context just after mapWithDefault

test.png

2. Use two contexts. This can be done by inserting a splitByValue on the Z1EKDP1 node.

test.png

Just maintain an equal number of contexts and you'll be fine.

 

Regards,

Mark


Viewing all articles
Browse latest Browse all 3189

Trending Articles



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