jayrdi
11 years agoOccasional Contributor
DataLoop for DataSink
I know that there is a DataLoop that can be used to iterate over elements in a DataSource, but how do I iterate over elements that I am extracting into a DataSink?
I have a SOAP Response containing 100 records and I need to extract different elements from each record and store the data in an Excel worksheet. Currently I am extracting the data with a Property Transfer and using a DataSink to save it to a spreadsheet. Below is an example of the code that takes the first author name in each record and transfers it to the DataSink (this is within the Source section of the Property Transfer window):
However, this takes ALL the names from every record as a list and stores them in a single cell in the Excel worksheet (similarly for the other data fields I'm extracting). How can I do the Property Transfer for the 1st record into the DataSink, then iterate back to do the Property Transfer for the 2nd record, and so on until I have iterated over all 100 records?
Thank you for your help!
John
I have a SOAP Response containing 100 records and I need to extract different elements from each record and store the data in an Excel worksheet. Currently I am extracting the data with a Property Transfer and using a DataSink to save it to a spreadsheet. Below is an example of the code that takes the first author name in each record and transfers it to the DataSink (this is within the Source section of the Property Transfer window):
declare namespace ns2='http://woksearch.v3.wokmws.thomsonreuters.com';
declare namespace ns1='http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord';
<full_name>
{
for $id in //ns1:name[1]//ns1:full_name[1]
return string($id)
}
</full_name>
However, this takes ALL the names from every record as a list and stores them in a single cell in the Excel worksheet (similarly for the other data fields I'm extracting). How can I do the Property Transfer for the 1st record into the DataSink, then iterate back to do the Property Transfer for the 2nd record, and so on until I have iterated over all 100 records?
Thank you for your help!
John