Sytax Error Code

I’m working on making something visible or not based on the user that is logged in (Not on the role that they have). My thought was to write a script tied to the visible option under common properties. My code looks like:

if {[System]Client/User/Username} = {_A_Name_/GoldTest7_7Simulator/Sensor /Sensor 1/Operator} return true else return false

And I keep getting the error:

Syntax Error on Token: ‘BOUND CONST’ (Line 1, Char 61)

I have no clue what that means, and I was wondering if there was some sytax I was missing, or if there was an easier way to accomplish what I am trying to do. Thanks in Advance for the help!

Hi,

It looks like you are mixing Python syntax and expression language syntax. Are you trying to write an expression or write a Python script?

If you are writing an expression then this will work:

{[System]Client/User/Username} = {_A_Name_/GoldTest7_7Simulator/Sensor /Sensor 1/Operator}If they are equal then true is returned, otherwise false is returned. No "if’ condition needed.

Best,