Expression Binding not submitting

I’m writing a little script that will hide the acknowledge button on an alarm status table if a user is logged in and does not have the right credentials. Below is my code.

if ({[System]Client/User/RolesString} = Administrator

The error I keep getting is invalid character, but I’m not sure what is invalid? I’m sure I’m just missing some quotes somewhere or a semicolon or something like that (I’m a little new to python). Any help would be much appreciated! Thanks in advance!

Hi! Welcome ti the forums!

Try putting quotes around “Administrator”.

EDIT: Forget that. New post forthcoming…

Sorry, not enough caffeine yet. :laughing:

Expressions use an “expression language” and not python. The If function is kind of like Excels:
if( test, result if true, result if false )

In your case, it would look something like:

if ({[System]Client/User/RolesString} = "Administrator",1,0)