Question

Adding a row (or record) of data to Datatable in a loop

  • 14 August 2023
  • 1 reply
  • 380 views

Userlevel 3
Badge +9

What I want to do sounds like it should be simple and straightforward, but I can’t think of how to do it in an elegant way.

I am iterating through a list of files and scraping field data from each file within the iteration.

After I scrape all the info from the file, I just want to add the list of values as a row (record) after the last row in the Datatable.

How can I go about this as simply as possible? Or is it possible?


1 reply

Userlevel 2
Badge +8

 

Unfortunately, working with record objects in AA is anything but elegant. Here is a simple example which you should be able to modify to your needs. First I create an empty record with the headers I need:

 

I have my table read in from whatever data source: 

 

And I go through and update the columns in my record with the appropriate information, then insert the row into the table:

 

Reply