How to derive the tag path from an alarm event

Given an alarm event object. Is there a way to obtain the tag path from that alarm. My alarm comes from a tag and I can get the 'source' property and this has the tag provider and the alarm name. I simply want the tag path for example '[default]My Tag' instead of 'prov:default/tag:My Tag/alarm:Test Alarm'

The source is a QualifiedPath object which has various structured mechanisms to extract data.

1 Like

toStringSimple, perhaps?

Probably the simplest that gives you the representation you're looking for:

from com.inductiveautomation.ignition.common import QualifiedPathUtils
tagPath = QualifiedPathUtils.toTagPathNew(alarmEvent.getSource()).toStringFull()