I’m using typescript in an action backed by a function to feed in data from an ontology object (excludeaaas below, , reading in as an array of items) and I’d like to append new rows to an object called YYYExclusions (below) .
I’m looping through each ‘item’ in excludeaaas, doing a bit of transformation and adding the the new columns. Not sure if what I’m doing below will truly appending to the dataset or will I be overwriting rows? any help with typescript would be great!!
If you want to create new instances of YYYExclusion you need to use Objects.create()... syntax. Though I’m not exactly sure if creating new objects is what you mean by appending to do the dataset. Does that help or if not, please could you provide a bit more explanation as to what you’re trying to achieve?
Hi @jedboffey correct. YYYExclusions is an object without a backing data source. The object currently contains the following 6 columns and 2 rows in each column: ExpirationID: 123, 456; aaaCategory ‘test1’, ‘test2’; Id: 1, 2; expirationDate: 8/6/2025, 8/9/2025; submittedBy: ‘Josh’, ‘David’; submittedat : 8/4/2025, 8/2/2025
Going forward, I do not want to create a new instance of the object, I only want to add/append new rows, and not over-write any records already in this object.