I am trying to copy the table data to the dataset from using the event script getting the Error_typeConversion how can resolve the error.
Is your table's data format a dataset or a list of dicts/json? How is the table getting its data? What are you trying to achieve by putting the table's data into a dataset tag? Is that memory tag configured to be a dataset?
Thanks for review, i have two tables one table get data from the CSV file by using file upload component and another table will get the filtered data these filtered data i need to copy to individual tags.
csv file upload script
class CSVParser:
def __init__(self, file_in):
self.file = file_in
self.file_string = file_in.getString()
self.rows = [row.split(',') for row in self.file_string.split('\r')]
self.num_cols = max([len(row) for row in self.rows])
self.num_rows = len(self.rows)
self.headers = self.rows[0]
self.data = self.rows[1:]
@property
def extended_headers(self):
headers_output = self.headers
ii = 1
while len(headers_output) < self.num_cols:
headers_output.append('Placeholder{}'.format(ii))
ii += 1
return headers_output
def extend_row(self, row):
row_output = row
while len(row_output) < self.num_cols:
row_output.append(None)
return row_output
@property
def dataset(self):
headers = self.extended_headers
data = [self.extend_row(row) for row in self.data]
return system.dataset.toDataSet(headers, data)
file upload component script
def runAction(self, event):
system.perspective.print('file received')
parser = parsers.CSVParser(event.file)
self.getSibling("Table").props.data = parser.dataset
system.tag.writeBlocking("[edge]FETCHED_DATA_TAGS/ALL_DATA",[parser.dataset])
Table_0 data property

Looks like you might have messed up the formatting in your post, you can click the pencil icon near the bottom right to edit/correct it.
Enclose the tag path in []
, you enclosed the value but not the tag path. The function might be trying to write a list to a dataset tag. Also double check that the tag actually is a dataset tag.
For the filtered data, are you aiming to copy 1 row to 1 tag?
Keep in mind that if multiple users have this interface open and are proceeding through your process they will be overwriting the same tag.
Also, have your import data and filtered data stored in view custom properties and bind the tables to the associated properties. It will make it where you don't need to do getSibling
to get the data. It also makes it more resilient interface layout changes. Your script would grab it via self.view.custom.property
, regardless of where the calling object was on the view.