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.
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.
On a onclick event button I using to export .csv file I´m using
component.props.data:
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)
Hi,
I think you should use :
data = self.getSibling('Table').props.filter.results.data
not data = self.getSibling('Table').propos.data