Page 1 of 1

Static values in Rowset (XML to CSV)

Posted: Mon Apr 23, 2012 7:58 pm
by SeanC
I'm attempting to convert an XML file to a CSV and two of the columns in the CSV output require a static value which does not come from the XML. Is there a way to "retrieve" a static value as part of an XML rowset? I tried adding a column, pointing it a non-existent attribute like /Entries/Row/@FOO and then setting the Null Indicator to "StaticValue" but it's not showing up in the output.
Code: Select all
<xmlRead file="${currentFile}" version="1.0">
	<rowset name="documentRows" nestedSharedValues="true">
		<column index="1" value="/Entries/Row/@RebatePaymentID" name="Payment ID" />
		<column index="2" value="/Entries/Row/@RebateProgramName" name="Program Name" />
		<column index="3" value="/Entries/Row/@FOO" name="Created By" nullSubstitute="StaticValue" />

Re: Static values in Rowset (XML to CSV)

Posted: Fri May 04, 2012 4:42 pm
by RElliott63

The only option I know of in this scenario is to put your Static value in the Write Segment, not the Read Segment. This can be done easily before an Insert into a DB or writing column formatting.