Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to create tXMLMap nested loops

 

I have the below flow, and I would like the userGroup to be a loop as well according to data that's coming from another database lookup, Can you point me to the best way to approach this, I'm not able to do it right now.

 

Your help is appreciated.

 

0683p000009M1e5.png

0683p000009M1eA.png

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

4 Replies
Anonymous
Not applicable
Author

Good morning,

 

Can you guys help with this.

 

Thanks!

Anonymous
Not applicable
Author

Can anyone please help with this?

 

Thank you!

Anonymous
Not applicable
Author

 

I followed the example in here: https://community.talend.com/t5/How-Tos-and-Best-Practices/prepare-XML-with-multiple-loop-in-same-le...

But the problem is when it gets to the lookup part it won't bring all the user groups, it will bring only one row. 

 

here is the flow:

0683p000009M1oj.png

 

here is the tCMLMap_3:

0683p000009M1eR.png

 

Here is the tMap_1

0683p000009M1ct.png

 

Here is the expression to replace the string:

row10.userGroup==null?
row9.payload.replaceAll("<UserGroups>WIRECODE_PLACEHOLDER</UserGroups>", "")
:row9.payload.replaceAll("<UserGroups>WIRECODE_PLACEHOLDER</UserGroups>", row10.userGroup)

 

Here is tTeradataInput_2:

0683p000009M1mK.png

 

Here is the resulted user node in the XML:

0683p000009M1cu.png

 

Here is the expected user groups:

0683p000009M1NP.png

 

is there something wrong with the way I do the join?

 

Your help appreciated!

 

 

 

Anonymous
Not applicable
Author