Dynamic Symbol Based On Alarm Priority

Trying to toggle visibility on 4 symbols using "Highest active priority" of a tag. Currently I made 4 symbols and 4 template parameters. One for critical, high, low, medium all booleans. I also adjusted my alarm journal to where low=1 and critical=4. When I go to drop my template on a page and make an expression for my properties my visibility is constantly going between true and false. Attached is the expression I am currently using.
if({[default]Test Tag/Alarms.HighestActivePriority}=4, {Root Container.Level 1 Mixer.MixerCriticalAlarmVisibility}=true, {Root Container.Level 1 Mixer.MixerCriticalAlarmVisibility}=false)
Screenshot 2024-08-21 075652
Screenshot 2024-08-21 075707

Post code, man, not pictures of code! That way we can copy it into our answers and edit it. See Wiki - how to post code on this forum.

To answer your question, you are trying to write a script in an expression. You can't.
Think of the Expression Language as being like Excel functions. The if() expression returns one thing if true and another if false. You can't create a variable assignment in there.

Tip: the Expression Language doesn't care about line breaks. You can wrap your function in the editor which will make it much easier to read and maintain. e.g.,

if(
    test_condition,
    what_to_return_if_true,
    what_to_return_if_false
)

Sorry, I followed the link you sent and changed it to code rather than a picture. The if statement I am using is from logic under the expression option of binding.

Tidied up code:

if(
    {[default]Test Tag/Alarms.HighestActivePriority} = 4, 
    {Root Container.Level 1 Mixer.MixerCriticalAlarmVisibility} = true, 
    {Root Container.Level 1 Mixer.MixerCriticalAlarmVisibility} = false
)

As explained, you can't do variable assignment in expressions. The = true and = false are not allowed.

Instead, create a binding on Root Container.Level 1 Mixer.MixerCriticalAlarmVisibility which will just contain the expression,
{[default]Test Tag/Alarms.HighestActivePriority} = 4
That will evaluate to either true or false.

Got it working! Thank you!