Script to pass parameters to a parameterized popup window

Hello all,

I was attempting to see if it was possible to pass a parameter to a popup window using a script that is ran from another window. All of the articles from ignition that I've found have been about using buttons and the navigation tab of an event handler, but I'm attempting to pass this data using a script as the information I want to pass in is more than I can do with just an event handlers property binding.

If anyone knows of a way to do this or can point me to a better thread that would be incredible,

Thank you!

What will trigger this script?

The current idea is a popup trigger from a power table. One of the right click menu functions that you can write for your own power table.

Ok. Sounds like you want to use the extension function of the power table then to allow the user to run the script that opens the window.

Just use system.nav.openWindow - Ignition User Manual 7.9 - Ignition Documentation

You would do

params = {"someParam1":someValue, "someParam2":someValue2, ....}

system.nav.openWindow("MyPopupWindow", params)

Run whatever database/tag/scripts necessary to form your params, but ultimately you just need to call
system.nav.openWindow("MyPopupWindow", params)

1 Like

There it is, that’s what I was missing. I had no idea the params portion of that function existed. I really need to read more closely. Do you know if that’s around in 7.8? I would assume it is.

Yes it is there for 7.8. system.nav.openWindow - Ignition User Manual 7.8 - Ignition Documentation

1 Like

You’re a hero, thank you.

1 Like

kindly let me know, how to pass the parameter(entered password to Textfield) in the popup window in to script?

Did you checkout the documentation page I linked? Sounds like you just need to select the right property, the .text off your text field, and put it in your params and pass it like system.nav.openWindow("MyPopupWindow", params).

This thread is also a few years old so you may want to start a new thread, and if you do - you should show what you are trying now and what errors you are getting from your current method. It's the easiest way for people here to help troubleshoot your issue, is if we can see the actual code.

2 Likes

Easiest way to find an example script is to use the built-in GUI to configure one popup with parameters and then go to the script page. It'll auto generate a script and show you how parameters are passed in.

It's a dict of parameters.

2 Likes