Swap Window Navigation

Hi There…

I’m using “swap” function to navigate throughout my projects. I noticed that there were multiple windows open in the “windows” menu/ I double checked & I am using the “swap” function. However, instead of swapping, it opens the next window & leaves the starting window open. I’m using FPMI 3.2.0. This is creating many more queries than are necessary. My windows ARE Closeable. Any idea why the swap isn’t working? :question:

fpmi.nav.swapTo(‘DOWNTIME’)

Thanks for any ideas…

swapTo() is designed to be used with a window that’s maximized, even if you have docked windows.

Check out the fpmi.nav.swapWindow() function. You’ll have to type the code yourself instead of using the Navigation Editor. There are 2 variants:

  1. The first requires the event object as the first parameter. Use this if you want to swap the window that contains your object - for example, the window with the button that you’re clicking.

  2. The second requires the window name to be swapped as the first parameter. Use this if you want to swap out a different window. Keep in mind that if you want to swap this window multiple times, you’ll need to track it. I’d recommend a SQLTag for that. Additionally you’d want to put the call in a module that swaps based on the SQLTag then sets the new value.

In both cases the second parameter is the Window Name to swap to and the optional third is a dictionary of parameters to pass.

Hey, THANKS! Within your message, I found the answer. I wasn’t starting the pages “Maximized”! Now that I have that fixed, the SWAP function is working!!

Thanks again! :thumb_left:

1 Like