1

I have created structure list of entity records using ListAppend.

I have all the data in structure list i.e. around 11 records.

At movement I am getting only [0]th record of structure list because of assigned File Content in the download widget in that fashion (I showed in image below). I want to export that all 11 records into text file but I stuck to assign File content property of Download Widget

Detailed Description:

  1. StructureFNMA2Record is my local variable for ListAppend Action

  2. StructureFNMA2RecordList is my another local variable for ListAppend Action

  3. So how I can assign that structure list of ListAppend to File Content that I will get all the 11 records in text file with new line after each index value of structure list

please help me..

enter image description here

ase
  • 13,231
  • 4
  • 34
  • 46
Bankat
  • 65
  • 3
  • 12

2 Answers2

0

You should iterate over your record list using a foreach element, and assign each position record's value to a new text variable concatenating it with NewLine().

In the end, you should output this newly created variable to your text file, as described here.

Hope this helped.

Community
  • 1
  • 1
pipo
  • 378
  • 1
  • 8
0

I think it's easier if you create a Text variable and write there what you want the file content to be. In that case you'll have a lot of freedom to manipulate the text as you wish and you can convert it to binary format and write it to the file when you're done.

The main idea is:

  • Create a variable... let's call it fileContent and set its type to Text
  • In the ForEach loop, instead of ListAppend use an Assign node
  • In the assign node, set fileContent as the variable
  • For the value, use something like fileContent + StructureFNMA2RecordList.Current.Name + [...rest of your fields...] + NewLine() ⇒ you're essentially appending content to the fileContent variable
  • Outside the loop, use your Download node just with TextToBinaryData(fileContent) because by now the variable contains everything you'll want to write in the file

This should give you a file with the fields in each line. You'll probably want to put something between the fields because concatenating Name and Phonenumber will give you Bankat12345 but if you put a space " " or something else in between you'll have a more readable Bankat 12345.

Miguel Ventura
  • 10,344
  • 2
  • 31
  • 41
  • Yes instead of ListAppend I used Assign node and followed further process that you discussed above and its working correct.. – Bankat Sep 24 '15 at 15:11