Skip to main content
Question

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

  • August 14, 2023
  • 1 reply
  • 1826 views

LoganPrice
Most Valuable Pathfinder
Forum|alt.badge.img+12

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

Forum|alt.badge.img+12
  • Navigator | Tier 3
  • 67 replies
  • August 14, 2023

 

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:

 

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings