Building Reusable Popup Templates with Alias Passing in FactoryTalk Optix

Build truly reusable popup dialogs in FactoryTalk Optix using Types and alias passing — so 50 parameters need one popup, not fifty copies.

The Problem: Copy-Paste Chaos

If you've been developing HMI applications for any length of time, you've probably hit this wall: you need the same popup dialog for 50 different parameters. Maybe it's a setpoint editor, a motor control faceplate, or a valve status popup.

The naive approach? Copy the popup 50 times and manually update each one.

The result? A maintenance nightmare where fixing one bug means touching 50 screens—and inevitably missing three of them.


The Solution: Alias-Driven Templates

FactoryTalk Optix gives us powerful tools for building truly reusable components:

  • Types (templates that define structure)
  • Instances (copies that inherit from the Type)
  • Aliases (dynamic data pointers that can be passed at runtime)

When combined correctly, you can build a single popup template that works for unlimited parameters—each configured in seconds, not minutes.

Let's walk through building a complete parameter editing popup system.


What We're Building

By the end of this tutorial, you'll have:

  1. A reusable data structure (BaseParam) for parameter configuration
  2. A popup dialog template (ConfirmParamPopup) that accepts any parameter
  3. A button template (OpenParamPopup) that passes data to the popup
  4. Min/Max validation on user input
  5. Clean separation between template and instance configuration

GitHub Repository: PopupAliasDemo


Step 1: Create the Base Parameter Object

First, we need a data structure that holds everything our popup needs to know about a parameter.

In your project, create a new Object in the Model folder:

FT Optix Model folder in project tree showing a newly created BaseParam object with parameter variables

Add these variables to the object:

  • ParamName (LocalizedText) - Display name
  • Nom (Float) - Nominal/current value
  • Mod (Float) - Modified value (for editing)
  • Min (Float) - Minimum allowed value
  • Max (Float) - Maximum allowed value

Why LocalizedText for ParamName? If you're planning to support multiple languages, LocalizedText lets you leverage Optix's built-in translation system. Future-proofing pays off.


Step 2: Transform Instance into Type

Here's where the magic happens. Right-click on your object and select Transform Instance into Type:

FT Optix right-click context menu showing the Transform Instance into Type option for converting an object to a reusable type

This "templifies" your object. Think of it like creating a UDT (User Defined Type) in PLC programming—except it lives in Optix.

After transformation, your project structure should look like this:

FT Optix project tree after transformation showing BaseParam as a reusable type with an instance in the Model folder

You now have a reusable data structure that can be instantiated anywhere and passed as an alias to dialogs, screens, and templates.


Step 3: Create the Popup Dialog Template

Now let's build the popup that will display and edit parameter values.

Create a new DialogBox template and add an Alias in the properties panel. Set the Kind to your newly created BaseParam type:

FT Optix DialogBox template properties panel showing an Alias named ParamAlias with Kind set to the BaseParam type

Key Point: Notice that nothing is bound to ParamAlias yet. We're defining what kind of data this popup accepts, not which specific data. The actual binding happens when we open the dialog from a button.


Step 4: Configure the Spinbox with Alias Data

Inside your popup, add a SpinBox for editing the parameter value. Here's where we leverage the alias:

FT Optix SpinBox properties panel showing Value and MaxValue bound to the ParamAlias alias in the popup dialog

Bind the SpinBox properties:

  • Value → {ParamAlias}/Mod
  • Minimum → {ParamAlias}/Min
  • Maximum → {ParamAlias}/Max

The spinbox will automatically enforce min/max constraints based on whatever parameter is passed to the popup. No hardcoding required.


Step 5: Add the Set Method to the Button

The confirm button needs to write the modified value back to the nominal value:

FT Optix button methods panel showing a Set method configured to write the edited SpinBox value back to the alias

Add a Set method:

  • Target: {ParamAlias}/Nom
  • Value: {ParamAlias}/Mod

When the user clicks Confirm, the edited value replaces the original. Simple and clean.


Step 6: Create the Button Template

Now we need a button that can open our popup and pass the appropriate data. Create a new template for the button:

FT Optix project tree showing the new OpenParamPopup button template with a BaseParam instance added to it

Add an instance of BaseParam to this template. We'll leave the values blank at the template level—they get configured when we place the button on a screen.


Step 7: Configure the Button Methods

The button needs two methods:

  1. Set - Copy Nom into Mod (so users see the current value when editing)
  2. Open Dialog - Open ConfirmParamPopup with our alias
FT Optix button template methods configuration showing Open Dialog and Close methods for the popup trigger button

For the Open Dialog method:

  • DialogType: ConfirmParamPopup
  • AliasNode: {BaseParamInstance}

This is the key connection—we're telling the dialog "here's the data you should work with."


Step 8: Add the Button to a Screen

Now let's use our template! Right-click and navigate to add OpenParamPopup to a screen:

FT Optix right-click context menu on a screen showing the option to insert an OpenParamPopup button instance

Step 9: Configure the Instance

Here's where you customize each button for its specific parameter. Select the button instance and set the properties:

FT Optix button instance properties panel showing alias binding to connect the button to a specific BaseParam parameter

Configure:

  • ParamName: "Temperature Setpoint" (or whatever)
  • Nom: Bind to PLC tag
  • Min: Bind to PLC tag or hardcode
  • Max: Bind to PLC tag or hardcode
  • Mod: Leave unbound (used internally)

Pro Tip: Everything except ParamName can be bound to PLC tags. ParamName is LocalizedText so it works with Optix's translation system.


Step 10: The Result

Here's the finished system in action:

FT Optix runtime view showing the completed alias-passing popup system with a parameter edit dialog open on screen
  • Click any parameter button → Popup opens with that parameter's data
  • Edit within min/max constraints → Spinbox enforces limits
  • Click Confirm → Value writes back to PLC
  • Click Cancel → No changes made

One template, unlimited parameters.


Key Takeaways

Why This Approach Works

Traditional ApproachAlias-Driven Templates
Copy popup for each parameterSingle popup template
Hardcode min/max in eachMin/max from alias data
Bug fix = touch every copyBug fix = update template once
50 parameters = 50 popups50 parameters = 1 popup + 50 configs

The Type/Instance Pattern

This pattern applies everywhere in Optix:

  • Faceplates for motors, valves, drives
  • Trend templates with dynamic tag binding
  • Alarm displays with equipment-specific filtering
  • Navigation templates with configurable destinations

Once you internalize this approach, you'll see opportunities everywhere.

Common Gotchas

1. Alias Kind Must Match

If your dialog expects BaseParam but you pass something else, it won't work. The Kind property must match exactly.

2. Transform Before Instantiating

Create your Type before making instances. If you create instances first, you'll have to redo them after transforming.

3. LocalizedText for User-Facing Strings

Using String instead of LocalizedText for display names works but locks you out of translations later. Start with LocalizedText.

Download the Complete Project

Grab the working example from GitHub:

Optix Project

The repository includes:

  • BaseParam Type definition
  • ConfirmParamPopup dialog template
  • OpenParamPopup button template
  • Demo screen with multiple parameter buttons
  • Emulator configuration for testing

Need Help Implementing This?

Building reusable templates is just the beginning. At ASQI, we help manufacturers:

  • Architect scalable HMI systems that grow with your operation
  • Convert legacy FactoryTalk View projects to modern Optix applications
  • Train your team on Optix best practices and patterns

Contact us for a free consultation on your next Optix project.


The Architecture Advantage — The strategic case for the reusable template patterns demonstrated here.

Development Best Practices for Optix — Project structure standards that support template-driven development.

Optix Layout & Positioning — Positioning techniques to use inside your reusable templates.