Alarm associated data changing via script

My client needs to individually change the broadcast system for each alarm in each tag. The broadcast consists of 4 email groups and 4 alarm groups. As you can see in the first photo, the groups were created in Udts, and in the second photo, it is possible to see that the values per tag are being brought. The problem is that it is not possible to return any changes made to the message.!
Photo 1

Photo 2

Thank you

Welcome to the forum!

What have you tried so far? You should be able to use system.tag.getConfiguration and system.tag.configure to modify the associated data values

for the first confirm button I used the code below:
Alarmspath = [event.source.parent.getComponent(‘Label_path’).text]
alarmConfig = {event.source.parent.getComponent(‘Dropdown Alarms’).selectedStringValue:[[“G1EMAIL”,“Value”,event.source.parent.getComponent(‘text G1EMAIL’).text]]}
#alarmConfig = {“High Temp”:[[“name”,“Value”,“Low Temp”],[“setpointA”,“Value”,“100”]]}


system.tag.editAlarmConfig(Alarmspath, alarmConfig)

The problem is activate the overridden in the alarm to do the configuration, because if I do as it is on the code I will loose rest of the configuration.

If you use the preformatted text button, it will format your code to make it easier to read.

I see you have ignition80 tagged. system.tag.editAlarmConfig has been deprecated, so you should use system.tag.configure instead.

Something like this should get you started.

# Replace these value assignments with the values populated in your window
tagPath = '[default]Path/to/Folder/TagName'
basePath = tagPath[:tagPath.rindex('/')+1]

# Get the current configuration of the tag
tagData = system.tag.getConfiguration(tagPath, False)[0]

# Write the updated value into the dictionary. 
# The [0] is assuming you only have 1 alarm on the tag. 
# If you have more, you may need to loop through to find the alarm name.
tagData['alarms'][0]['G1EMAIL'] = 'New Associated Data Value'

# Write the dictionary back to the tag
system.tag.configure(basePath, tagData, 'o')