# Export only filtered data

**URL:** <https://forum.inductiveautomation.com/t/export-only-filtered-data/99419>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 4, 2024, 1:31pm UTC](https://forum.inductiveautomation.com/t/export-only-filtered-data/99419 "2024-12-04T13:31:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JMarc](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@JMarc](https://forum.inductiveautomation.com/u/JMarc)\
**Post date:** [December 4, 2024, 1:31pm UTC](https://forum.inductiveautomation.com/t/export-only-filtered-data/99419/1 "2024-12-04T13:31:43Z")

</div>

I am working in perspective 8.1.13 and I would like to only export data filtered in my table component.

Below is the script I am using on my button but it exports everything in my table.

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

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [December 4, 2024, 1:39pm UTC](https://forum.inductiveautomation.com/t/export-only-filtered-data/99419/2 "2024-12-04T13:39:12Z")

</div>

On a onclick event button I using to export .csv file I´m using

component.props.data:

```python
def runAction(self, event):
		
  	component = self.parent.getChild("TabContainer").getChild("TablaOT")

	csv = system.dataset.toCSV(component.props.data)

    
	current_time = system.date.now()

	formatted_date = system.date.format(current_time, "yyyyMMdd")

    
	file_name = "TablaOT_" + formatted_date + ".csv"

	system.perspective.download(file_name, csv)

```

---

<div class="post-metadata">

**Author:** ![Ha99](https://avatars.discourse-cdn.com/v4/letter/h/7feea3/32.png) [@Ha99](https://forum.inductiveautomation.com/u/Ha99)\
**Post date:** [December 4, 2024, 1:42pm UTC](https://forum.inductiveautomation.com/t/export-only-filtered-data/99419/3 "2024-12-04T13:42:23Z")

</div>

Hi,  
I think you should use :  
data = self.getSibling('Table').props.filter.results.data  
not data = self.getSibling('Table').propos.data
