# How to see if dataset is undefined

**URL:** <https://forum.inductiveautomation.com/t/how-to-see-if-dataset-is-undefined/10163>\
**Category:** Ignition\
**Created:** [June 23, 2015, 3:51pm UTC](https://forum.inductiveautomation.com/t/how-to-see-if-dataset-is-undefined/10163 "2015-06-23T15:51:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ovendenk](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@ovendenk](https://forum.inductiveautomation.com/u/ovendenk)\
**Post date:** [June 23, 2015, 3:51pm UTC](https://forum.inductiveautomation.com/t/how-to-see-if-dataset-is-undefined/10163/1 "2015-06-23T15:51:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dave.fogle](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@dave.fogle](https://forum.inductiveautomation.com/u/dave.fogle)\
**Post date:** [June 23, 2015, 4:52pm UTC](https://forum.inductiveautomation.com/t/how-to-see-if-dataset-is-undefined/10163/2 "2015-06-23T16:52:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ovendenk](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@ovendenk](https://forum.inductiveautomation.com/u/ovendenk)\
**Post date:** [June 23, 2015, 5:25pm UTC](https://forum.inductiveautomation.com/t/how-to-see-if-dataset-is-undefined/10163/3 "2015-06-23T17:25:15Z")

</div>

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