Skip to main content
Question

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

  • August 14, 2023
  • 4 replies
  • 2302 views

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

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?

4 replies

Forum|alt.badge.img+12
  • Navigator | Tier 3
  • 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:

 

Forum|alt.badge.img+3
  • Navigator | Tier 3
  • November 9, 2025

That is the only way, yes...so “elegant”.


Forum|alt.badge.img+8
  • Navigator | Tier 3
  • November 10, 2025

@dean.hubak 

I've built a package with 100+ useful bot commands (actions, properties, variables, etc.) that make AA360 development way less painful, especially when dealing with different datatypes and common use cases.

It even generates record values dynamically! I'm releasing it publicly so the community can benefit from it.

 

https://github.com/A360-Tools/Toolbox/releases

 


Forum|alt.badge.img+12
  • Pathfinder Advocate | Tier 6
  • November 15, 2025

@LoganPrice  hi, sorry I might have not fully understood, but you can just add row in datatable package, in last record
its in dataTable package - add row property. If you have the record variable which you want to add as a row, its easy to do
If you have any questions to me, I will do my best