# Perspective AlarmJournalTable Export data with EventValue?

**URL:** <https://forum.inductiveautomation.com/t/perspective-alarmjournaltable-export-data-with-eventvalue/114432>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [March 11, 2026, 4:38am UTC](https://forum.inductiveautomation.com/t/perspective-alarmjournaltable-export-data-with-eventvalue/114432 "2026-03-11T04:38:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taohongyu88](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@taohongyu88](https://forum.inductiveautomation.com/u/taohongyu88)\
**Post date:** [March 11, 2026, 4:38am UTC](https://forum.inductiveautomation.com/t/perspective-alarmjournaltable-export-data-with-eventvalue/114432/1 "2026-03-11T04:38:52Z")

</div>

Version 8.1.24

In Perspective , Add AlarmJournal Table , How to Export Data with EventValue?

```python
	
	system.perspective.print ('onclick start')
	startDate = self.parent.parent.getChild("AlarmJournalTable").props.dateRange.historical.startDate
	system.perspective.print ( str(startDate))
	endDate = self.parent.parent.getChild("AlarmJournalTable").props.dateRange.historical.endDate
	system.perspective.print (str(endDate))
	journalName = self.parent.parent.getChild("AlarmJournalTable").props.name
	system.perspective.print (journalName)
#	priority = 
#	state =
#	path = 
#	source = 
#	displaypath = 
#	all_properties = 
#	any_properties = 
#	defined = 
	includeData = True 
	includeSystem = False
	includeShelved = True
#	isSystem =False
#	provider = 
	data = system.alarm.queryJournal(startDate = startDate, endDate = endDate, journalName = journalName,includeData=includeData,includeSystem=includeSystem,includeShelved=includeShelved)
	dataset = data.getDataset()
	system.perspective.print (dataset)
	system.perspective.print(type(dataset))
	headers = system.dataset.getColumnHeaders(dataset)
	
	# 转换成pydataset
	pydataset = system.dataset.toPyDataSet(dataset)
	system.perspective.print(pydataset)
		
	
	
	
	# 修改日期格式
	system.perspective.print('change date')
	new_rows = []
	for row in pydataset:
		system.perspective.print( row)
		new_row = list(row)
		event_time = row["EventTime"]
		system.perspective.print( event_time)
		if event_time is not None:
			new_row[pydataset.getColumnIndex('EventTime')] = system.date.format(event_time, 'yyyy-MM-dd HH:mm:ss')
		
		new_rows.append(new_row)
		system.perspective.print(new_row)
	system.perspective.print(new_rows)
	newdataset = system.dataset.toDataSet(headers, new_rows)
	system.perspective.print(newdataset)
	
	# 导出CSV
	system.perspective.print('start export')
	filename = "alarmHistory.csv"
	showHeaders = True
	csv_content = system.dataset.toCSV(newdataset, showHeaders)
	system.perspective.print(csv_content)
	system.perspective.download(
	        filename=filename,
	        data=csv_content,
	        contentType="text/csv; charset=utf-8"
	    )
	system.perspective.print(u"导出成功，请查收下载文件！")

```

Click Button , I can see many columns in CSV.

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

But I want to export EventValue to CSV, How to get?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/5/95d5f55962b719c994ee149985a3380f763de3ca.png)

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [March 12, 2026, 1:31am UTC](https://forum.inductiveautomation.com/t/perspective-alarmjournaltable-export-data-with-eventvalue/114432/2 "2026-03-12T01:31:58Z")

</div>

From the docs @ [system.alarm.queryAlarmJournal: Example #6](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-alarm/system-alarm-queryJournal#code-examples):

```python
for alarm in alarms:
    print alarm.getId(), alarm.get('eventValue'), alarm['eventValue']

```

Plan to iterate over the alarms returned and build your own dataset using the columns that you want in the csv export.
