How to see if dataset is undefined

I’m working with the alarm status table and created a button that looks at the selected alarm and displays the OPC item path for that alarm. I have IF statements using selectedAlarms.rowcount to make sure only 1 row is selected.

Problem is that until an alarm is selected, the selectedAlarms dataset says . That means it throws an error saying: ‘NoneType’ object has no attribute ‘rowCount’

Is there a way to script it to see if selectedAlarms is set to ?? Thanks in advance

You can just write an if statement that checks to see if the selectedAlarms == None.

It will return true in the situation you’re talking about.

Thank you. I’m an idiot, lol. Not sure why I didn’t think of that