Skip to content

XMLWrite task - adding two values

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
  • gaurav26 Offline
  • Posts: 1
  • Joined: Wed Apr 15, 2015 7:39 pm

XMLWrite task - adding two values

Post by gaurav26 »

Hello,

I am writing a project and in which I am reading an excel file and creating an xml using XMLWrite task as part of it.
For one of the elements, we need to add two values for the record in the RowSet and I am not able to achieve it using the + operator. Can you please let me know how it needs to be done. Also, either or both of the values can be blank in the source rowSet.

I am using the below code to do that.

<element name="SUISDITaxAmount" value="${transData['Local 1 Tax Paid']} + ${transData['Local 2 Tax Paid']}" skipIfEmpty="true" type="DECIMAL" trim="both" />
  • Support_Rick Offline
  • Support Specialist
  • Posts: 590
  • Joined: Tue Jul 17, 2012 2:12 pm
  • Location: Phoenix, AZ
  • Contact:

Re: XMLWrite task - adding two values

Post by Support_Rick »

Gaurav26,

Try utilizing the "ModifyRowset" task.

There is a Tips and Tricks Article that I put out back in June, 2014 about how to use this Task.

Just read your Excel Spreadsheet to create your rowset variable.
Modify the Rowset variable to add the values together creating the finalize rowset you desire.
Then, write out the rowset vars to your XML.

This should get you to where you're needing.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Post Reply