Tags with alarms listing from database query

I have been trying to figure out how to get exactly this kind of data bound to a table but I'm struggling. Do you have any suggestions? I tried doing a tag binding and adding a script transform which I'm sure is not the right way to go about it.

Can you explain in more details what you want to do ?
What's the input, what's the desired output ?

I want to display roster members and tags with alarms in a table. The desire is that I could have an ignition page showing who is in which roster and what tags have alarms and then which roster is associated the the tags that have alarms.

I'm currently pursuing using a custom method script on the table.

What part of this are you struggling with ?

There are a few things that could point to different solutions:
Are rosters and tags configuration expected to be modified often ?
How do you determine what roster is associated with what tag ?
Do the tag/roster associations vary under certain circumstances ?
Are you on Perspective or Vision ?

Based on my own answers to those questions, I'd put the code in a library script and call it from an 'update' button I'd put near the table, and maybe in a scheduled gateway event once a day, just in case someone updated things and forgot to click the button.
But in my case configurations don't change often, and pretty much all alarms are configured on UDTs, so I can only parse those and not the whole tag base.

The more details you give, the best help we can provide.

The rosters and tags are not currently expected to change often. We are newer into our process of implementing Ignition and still somewhat trying to decide what should have an alarm and who should be notified. Part of us trying to decide involves knowing what we are currently doing.
The roster to tag association should be static.
The tag/roster associations do not vary and we are not anticipating having them vary in the future.
We are using Perspective.

An update button sounds good and was something I had considered. What would the library script gain over a component script?

My current line of exploration is to update to 8.1.21 to get access to system.roster.* and then configure a script on the Table to gather tags with alarms and then show associated rosters. I'd then have a separate table that lists the rosters and which users are in those rosters.

Well I figured out the one part of what I was trying to do. Here is my onClick button script that populates my table with data.

	provider = 'default'
	
	query = {
	  "condition": {
	    "attributes": {
	      "values": [
	        "alarm"
	      ],
	      "requireAll": True
	    }
	  },
	  "returnProperties": [
	    "path",
	    "name",
	    "value"
	  ]
	}
	
	results = system.tag.query(provider, query)
	
	alarm_tags = []
	
	for dicts in results:
		for alarm in system.tag.getConfiguration(dicts['fullPath'], True)[0]['alarms']:
			alarm['fullPath'] = dicts['fullPath']
			alarm_tags.append({
				'Full_Path': alarm['fullPath'],
				'Active_Pipeline': alarm.get('activePipeline', ''),
				'Priority': alarm.get('priority', ''),
				'Acknowledge': alarm.get('ackMode', ''),
				'Custom_Email_Message': alarm.get('CustomEmailMessage', '')
			})
			
	self.getSibling('Table_0').props.data = alarm_tags

If you're gonna use getConfiguration anyway, I wonder if it wouldn't be easier to just call it once with recursive=True instead of using system.tag.query, and then search recursively for tags with alarms.
This may or may not be more efficient, I can't test it at the moment. I've also never used system.tag.query, didn't even know it existed.

You seem to be on top on things though, I'm not sure what I can help you with.
If you have troubles with something, you'll need to tell us what: