Static values in Rowset (XML to CSV)

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts Page 1 of 1

SeanC

Posts: 5
Joined: Tue Feb 28, 2012 1:52 am

Post by SeanC » Mon Apr 23, 2012 7:58 pm
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" />
	</rowset>
</xmlRead>

RElliott63

Posts: 14
Joined: Thu Jul 01, 2010 10:42 am

Post by RElliott63 » Fri May 04, 2012 4:42 pm
Sean,

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.

-Rick
2 posts Page 1 of 1