Open View when Tag Changed

Hello everyone.

If anyone could help me.
I want to open views/windows on Perspective when any tag (boolean) has change its value from OPC Tags. I was trying on tag editor window with the scripts of this forum but i cant do it.


There are many posts already, perhaps this one will be helpful, Show a popup in perspective on all clients if a value changes

By the way, you don't have any script.

This seems to be a copy of your posts on System.perspective.navigate doesn't work on session custom property tag change script - #6 by Francisco_Ochoa which already has a couple of answers.

Do you have a question?

yeah i cant get it , open view with tag change , i was trying with this option

with session custom


and this change script

can you help me with a same problem?

i want to open VIEW when a tag change value(boolean) but i cant do it , i tried with any examples of here but doesnt work

Welcome to the forum, Francisco.
For anyone to help you, you need to show,

  1. What you did. (Post formatted code - see Wiki - how to post code on this forum - and post a nicely cropped screenshot if you think that will be helpful.)
  2. What did you expect to happen?
  3. What happened? (Error messages, etc.)

Otherwise everyone is just guessing.

Tags are outside your project. Tags know nothing about your project. Tags don't know if your project is open or not. Tags know nothing about session properties in your project.

Try this:

  • Create a session custom property on your project.
  • Create a tag binding on that custom property.
  • Create an onChange event on that custom property. Put your navigation script in there.
2 Likes

That, and you got your indentation wrong, as the red squiggle is trying to tell you.

the last point onChange event should be write on Expression??

im new on Perspective module the interface is totally different with Vision

The last point onChange event should be write on Expression?

No.

  • Right-click on session.custom.openview.
  • Select Add Change Script.
  • Add your code there.

Good morning Transistor.

i put the code but i have a syntax error.

Make sure that you are consistently using one tab character to indent, not any mixture of tabs and spaces. You can right click in the script editing area and select 'Appearance' -> 'Show Whitespace' to see the invisible indentation characters.

1 Like

i dont have syntax error but the code doesnt run

might. Looks like you can't.

2 Likes


im tried with the other code

show this


Your for loop isn't indented to be part of the def.

i move it but its the same error