Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
KKrzak1612860338
Contributor
Contributor

txmlmap loop with 0 elements

Hello community,

I've searched around but could not find the answer.

I have an XML structure shown on attachment.

0695b00000F6jQBAAZ.png

The issue is when the repeatable items are not returned, then the document does not get created at all (as loop is kind of a row generator in Talend).

What is the best way to generate the document without the repeatable items ? THMap ? Split the document and then combine after mapping ?

So far I have a tExtractXML connected to tJavaFlex to count elements and two "Run if" triggers (for count == 0 and count > 0). That seems really complex and unnecessary.

Any suggestion appreciated.

Karol

Labels (3)
3 Replies
gjeremy1617088143

Hi, have you try to set create empty element to true in the output of the tXmlMap?

Send me Love and Kudos.

 

KKrzak1612860338
Contributor
Contributor
Author

Hi,

That does not help. It controls the output not the loop row generator.

gjeremy1617088143

Hi can you try loop optional instead of loop in the xmlmap input ?