# How to copy the Perspective table data into dataset tag

**URL:** <https://forum.inductiveautomation.com/t/how-to-copy-the-perspective-table-data-into-dataset-tag/101310>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 23, 2025, 7:21pm UTC](https://forum.inductiveautomation.com/t/how-to-copy-the-perspective-table-data-into-dataset-tag/101310 "2025-01-23T19:21:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak\_CL](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@Deepak\_CL](https://forum.inductiveautomation.com/u/Deepak_CL)\
**Post date:** [January 23, 2025, 7:21pm UTC](https://forum.inductiveautomation.com/t/how-to-copy-the-perspective-table-data-into-dataset-tag/101310/1 "2025-01-23T19:21:14Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1a6e625ad0bcc178cdea2c13c6dd482fdc2873a7.png)

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [January 23, 2025, 7:24pm UTC](https://forum.inductiveautomation.com/t/how-to-copy-the-perspective-table-data-into-dataset-tag/101310/2 "2025-01-23T19:24:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Deepak\_CL](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@Deepak\_CL](https://forum.inductiveautomation.com/u/Deepak_CL)\
**Post date:** [January 24, 2025, 6:46am UTC](https://forum.inductiveautomation.com/t/how-to-copy-the-perspective-table-data-into-dataset-tag/101310/3 "2025-01-24T06:46:20Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/4/74cd0cc7817d7b1c1e00c0090b232ed3e7073535.png)

csv file upload script

```python
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])

```python
Table_0 data property
![image|690x372](upload://pNHoD5twHzfFyA7fKpbWtyxw2zr.png)

```

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [January 24, 2025, 5:07pm UTC](https://forum.inductiveautomation.com/t/how-to-copy-the-perspective-table-data-into-dataset-tag/101310/4 "2025-01-24T17:07:31Z")

</div>

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.

> [@Deepak\_CL](#):
>
> system.tag.writeBlocking("[edge]FETCHED\_DATA\_TAGS/ALL\_DATA",[parser.dataset])

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.
