Write value when screen is opened and closed

<< Click to Display Table of Contents >>

Navigation:  Examples > Change tag's value >

Write value when screen is opened and closed

Previous pageReturn to chapter overview

In this example we will show how to write value when screen is opened and closed. Let's create tag with name Tag:

tagvalue

Let's create 2 screens - General and Popup. On the general screen let's place button that will open Popup screen and on the popup screen let's place button to close popup screen:

generalscreenpopupscreen

Let's create 2 Screen type scripts. One is executed when popup screen is opened. Second is executed when popup is closed:

closescript openscript

Texts of the scripts:

closescripttextopenscripttext

Let's add these scripts to the Collection of the Popup screen:

screenproperties

Let's Run simulation to check the settings:

writeopenclose

You can download this project here.