Ignition Perspective: View/Update text fields from one View to another

Hello, is it possible in Ignition Perspective to update a text field on another View in the Perspective project? I have a Main Menu View that when I click a button, I want to update a text field on another view?

Thanks,

David

You can use message handlers for this.

On the text field you want to update from the other view, right click on it choose “Configure Scripts” and create a message handler to update its text value based on a payload sent to it. Make sure it’s listening on the “Session” scope so external views can send the message to it.

You can then send the message from another view using system.perspective.sendMessage() and providing the sendMessage function the handler name you set up on the text field.

2 Likes

For clarification, this process will work very well as long as both Views are open in the current Session.

If you are attempting to update a Text Field for a View which is NOT currently open, you’ll need to incorporate either params for the View which contains the text Field, or use of a session property.

1 Like