Label Enabled property not working as expected

Hi, new to Ignition. I have a Label with a mouseReleased script and I’m binding the Enabled property to the Expression hasRole(“Administrator”). However, when I log in without Administrator role, the mouseReleased script still fires off. I would think that of the label was Not Enabled that it should not perform any action or script? Ive used the Expression hasRole() for other components and it works as expected. Any ideas?

Hi! Welcome to the forums!

Mouse events will still fire, even if a component is set to be disabled. All is not lost, however. You can use the Enabled property in your script:

[code]if event.source.enabled:

do some stuff…[/code]

Hope this helps!

1 Like