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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacco_De_Zwart
Creator
Creator

additional columns no passed trough WriteXMLField

Hi,

I have this setup :

 

Schermafbeelding 2026-03-24 082312.png

the schema for twriteXMLField looks like this :
Schermafbeelding 2026-03-24 082430.png

The goal is to pass the column Value as an additional column of the output schema of the tWriteXMLField component.

This does not happen. The column Value is not passed.

Even when using a tMap after the tWriteXMLField and do a globalMap.get("row1.Value") allso gives null.

But in the XML document, the Value collumn is used and the contents is visable.

 

What am I doing wrong ??

 

Jacco

Labels (3)
2 Replies
David_Apodaca
Support
Support

Hey Jacco,

 

I know your screenshot shows the Value column being explicitly defined in the input and output schema in the Studio UI, can you also make sure you are mapping the column in the XML editor of the component as well? This is a manual mapping step inside the component's internal editor.

 

tWriteXMLField Standard properties:
https://help.qlik.com/talend/en-US/components/8.0/xml/twritexmlfield#anchor-2

 

Open the tWriteXMLField settings, click 'Configure XML Tree', and drag the Value column from the input side to the output side. 

 

This is the standard way to 'pass through' the columns in this component. If you haven't done this yet, then the Value column won't be properly incorporated into the XML structure, even though it exists in the schemas. The XML tree mapping is what actually defines how input data becomes XML content, the schema alone isn't sufficient.

 

This is what we should focus on first. 

 

Respectfully,
Qlik Support

 

Jacco_De_Zwart
Creator
Creator
Author

Hi David,

Thanks for your response and sorry for my late reaction.

I have incoorperated this in a larger example. I retrieve data from a database with a query. Pass this data to XMLMap and create the XML structure. This works.

The picture below shows the collapsed XML structure and your suggestion to map a single column. 

Jacco_De_Zwart_0-1775718149601.png

 

The column TerminalFilePrefix is mapped with a variable that has a expression in order to fill the value.

Jacco_De_Zwart_1-1775718250023.png

 

When I look to the output of the XMLMapper with a tLog, the column is filled with the right value.

.------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------.
| |
|=----------------------------------------------------------------------------------------------------------------------------------+-----------------=|
|Invoice |TerminalFilePrefix|
|=----------------------------------------------------------------------------------------------------------------------------------+-----------------=|
|<?xml version="1.0" encoding="UTF-8"?>
<DATA><INVOICE><COMPANY/><DEBTOR>000099999</DEBTOR><EM/><ITEMCODE>B</ITEMCODE>INE><CTINVOICE>BI/0000158</CTINVOICE></INVOICE></DATA>|VTT |
'-----------------------------------------------------------------------------------------------------------------------------------+------------------'

The XML is shortend.

But how do I use this value in the cloumn TerminalFilePrefix in the tFileOutputXML component ?

Jacco_De_Zwart_2-1775718641714.png

note: the value of row1.invoicenumber can be used

But the value of row3.TerminalFilePrefix is null eventhough tLogRow_2 shows an acutal value