Skip to Content
0
Jun 22, 2020 at 10:25 AM

UseOneAsMany cannot handle empty contexts

400 Views

Hello guru's,

In this scenario the sender message will have multiple headers and each header can have multiple lines. Normally there is allways at least on line.

In the mapping each line from the sender must create an item at the receiver.

The field 'map2item' must be mapped from the header into item.

So if a header has 2 lines the field map2item must be used twice.

I use the node function UseOneAsMany for this and it works fine.

But, sometimes there is no line in a header and then there are empty contexts.

In that case the UseOneAsMany function will throw an error: "..... Too few values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue......"

And this is what the queus look like

I've tried quite a few things to get this to work in a proper way, but so far without success.

Please help me solve the issue.

Maybe it can be done with standard function?

Maybe it is better to go with UDF? If so please provide some coding for the UDF?

Regards

Robert

Attachments

16w4y.png (86.8 kB)
ymtby.png (85.3 kB)