Currently it is not possible to detect if the active alarms tab is selected or the shelved alarms tab. having a tab idnex or some similar property helps the user with some customization.