Skip to content

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.
  • SeanC Offline
  • Posts: 5
  • Joined: Tue Feb 28, 2012 1:52 am

Static values in Rowset (XML to CSV)

Post 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" />
	</rowset>
</xmlRead>
  • RElliott63 Offline
  • Posts: 14
  • Joined: Thu Jul 01, 2010 10:42 am

Re: Static values in Rowset (XML to CSV)

Post by RElliott63 »

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
Post Reply