The Multiple Popups feature allows users to create multiple instances of the same Display simultaneously using the Display.NewPopup and Client.NewPopup methods. Each popup operates independently, enabling unique configurations through input parameters such as labels, position, and size. The software platform manages Display.NewPopup automatically, while Client.NewPopup requires manual updates if the Display name changes. This feature facilitates dynamic, concurrent user interface interactions without closing existing displays.


Add a Display or Popup

There are many ways to open a new Display or Popup in a Solution. For each method, some specific characteristics must be considered. The list below shows some of those methods as well as a brief description of their behavior.

Display.Open

  • Begins the Open Display process. The syntax is as follows:

Display.<DisplayName>.Open()

  • Returns a flag (true or false) indicating success or fail. 

E.g.: @Display.MainPage.Open()


Display.OpenModal

  • Opens Display as Modal. The syntax is as follows:

Display.<DisplayName>.OpenModal()

  • Not available for Mono and HTML5

  • Returns a flag (true or false) indicating success or fail.

E.g.: @Display.SelectPage.OpenModal()


Display.NewPopup

  • Opens a new one. If the Display is already open, a new instance will open. The syntax is as follows:

Display.<DisplayName>.NewPopup(input parameters)

  • The accepted input item parameters are:

LabelList[label1=tag1; label2=tag2], Left, Top, Width, Height.

  • Always returns an empty string, independent if it succeeds or fail.

E.g.:@Display.MainPage.NewPopup(["VALUE  =  Integer1;  NAME  =  ’Example’"])


Client.OpenDisplay

  • Opens a Display. The syntax is as follows:

Client.OpenDisplay("<DisplayName>")

  • Returns a flag (true or false) indicating success or fail. 

E.g.: @Client.OpenDisplay("About")


Client.OpenDisplayAtIndex

  • Opens Display at x-order. List of Current Display is closed. The syntax is as follows:

Client.OpenDisplayAtIndex("<DisplayName>", index)

  • Returns a flag (true or false) indicating success or fail. 

E.g.:  @Client.OpenDisplayAtIndex("LogOn", 2)


Client.NewPopup

  • Opens a new one. If the Display is already open, a new instance will open. The syntax is as follows:

Client.NewPopup(input parameters)

  • The accepted input item parameters are:

LabelList[label1=tag1; label2=tag2], Left, Top, Width, Height.

  • Always returns an empty string, independent if it succeeds or fail. 

E.g.:  @Client.NewPopup("GAUGE = Integer2")


Differences

When you add an OpenDisplay method to a Solution but then change the name of the Display, you will have some different results if you use the @Client or @Display methods.

  • In the @Display methods: Since the DisplayName is used as one of the properties, the software is smart enough to detect if the Display Name was changed and automatically update the method.

  • In the @Client methods: The DisplayName is used a string type input parameter. If the display name is changed, the user must manually update the method.


NewPopup Characteristics

Symbols

Labels are often used as parameters for symbols as a way to facilitate the Solution setup. However, there is a limitation when combining the NewPopup input labels and Symbols added to the Display.

If there are two or more of the same symbol in the display, the software will not differentiate them. Since all the labels are equal, it will associate all symbols to the same Tag.

Therefore, the utilization of multiple Popups, one for each symbol, is an excellent approach to achieve this goal.

Online Configuration

Online Configuration is another interesting feature to use in a Solution. It allows the modifications that are made to a Solution in the Engineering Environment to affect the application in real time. You can find it in Runtime → Startup.


In this section:


Appendix

Overview

This document presents information about multiple display instances.

How to Use

This feature allows you to have multiple instances of the same display opened simultaneously.

The specs for the computer used for testing are listed below:

  • Product version 1.9.
  • TWebServices or any other WebServer (like IIS)

Besides allowing you to have the same popup display opened multiple times, they can also be customized using a list of user-defined parameters that are inputted on the method.

Creating a Popup

To create a popup that displays multiple lines in the system, assign each line a Tag using a custom Template datatype containing relevant details. Configure the popup to access and display the data for each line by referencing its associated Tag. This approach allows the system to present all line information within a single display, making monitoring and controlling each line from the popup interface easier.

To create a customizable popup, you need to follow a specific syntax when defining the elements/components expressions.

#<PropertyName>:<TagName>

This syntax will create an exposed label for the element property. This makes it easier to map any linked tags to it.

This syntax can be used in all available components. It can also be retrieved in the CodeBehind Environment with the code below.

var label = this.CurrentDisplay.GetLabel("<LabelName>");
// <LabelName> is an user-defined input parameter


It is important to make sure that the display mode is configured as a popup.


Runtime Methods

The methods available for the NewPopup feature are listed below.

Display.<DisplayName>.NewPopup

This method is available for both .NET and HTML5 displays. Its syntax is described below:

/// <summary>
/// Begin Open new popup method
/// It should be called on ServerStartup task only
/// </summary>
/// <param name="items">LabelList[label1=tag1;label2=tag2],
/// Left, Top, Width, Height</param>
/// <returns>Always an empty string</returns> @Display.<DisplayName>.NewPopup(object[] items);

The items array will contain the LabelName and its assigned runtime object (Tag), which will replace the placeholder configuration on the display.

It is also possible to use fixed parameters in the LabelList. In this example, we will have our title be dynamic but unrelated to any Tags.

An example of this method is:

// Mapping for Tag.Line01 @Display.MyPopup.NewPopup("#Line=Line01;#Title='Title for Line01 Display'");
// Mapping for Tag.Line02 @Display.MyPopup.NewPopup("#Line=Line02;#Title='Title for Line02 Display'");

where [MyPopup] is the display name of this example.

To get the Title label from the LabelList and use it to modify the Display Title, the following code must be added to the DisplayOpening method:

public void DisplayOpening()
{
	this.CurrentDisplay.SetTitle( this.CurrentDisplay.GetLabel("#Title") );
}


Client.NewPopup

This method is available for both .NET and HTML5 displays. Its syntax is described below:

/// <summary>
/// Begin Open new popup method
/// It should be called on ServerStartup task only
/// </summary>
/// <param name="displayName">Display Name in Solution</param>
/// <param name="items">LabelList[label1=tag1;label2=tag2],
/// Left, Top, Width, Height</param>
/// <returns>Always an empty string</returns> @Client.NewPopup(string displayName, object[] items);

The items array will contain the LabelName and its assigned runtime object (Tag), which will replace the placeholder configuration on the display.

It is also possible to use fixed parameters in the LabelList. In this example, we will have our title be dynamic but unrelated to any Tags.

An example of this method is:

// Mapping for Tag.Line03 @Client.NewPopup("MyPopup","#Line=Line03;#Title='Line 03 -- Title'");
// Mapping for Tag.Line04 @Client.NewPopup("MyPopup","#Line=Line04;#Title='Line 04 -- Title'");

where [MyPopup] is the display name of this example.


In the end, the Solution's behavior should be the same despite the method used.