Active page & last active page

Hi All,
lets Consider I have a view


Here I have validation on single text box if no data occurs it throws a popup like below

this is a separate view
here my concern is once the pop up is appear the back active page need to be block(the user no need to access it).
any suggestion's to archive it
Thanks in advance.

Hope this will help

Docked Views - Ignition User Manual 8.1 - Ignition Documentation.

It's not clear what is triggering the popup but, assuming it is a Save button or similar I can think of two solutions.

  1. Make the popup modal. That prevents access to the background.
  2. Don't enable the Save button until all the required fields have been filled out. Add an indicator beside each field (an icon would do nicely) to show that the field isn't ready and add a tooltip to explain what is required.

See Trouble with 'if' statement, button event - #5 by Transistor for more on idea 2.

2 Likes

Hi,

thank you for your suggestion can you explain the 1st point little bit more clearly

The modal option, when enabled, prevents access to underlying views until the popup is closed.

1 Like

Ok Understood but I'm using the script

	# to check
	if (self.parent.getChild("cnt_Process").getChild("FlexRepeater").props.instances[0].param1 == ''):
		logger = system.util.getLogger("myLogger")
		logger.info("project Data Not Saving ")
		system.perspective.openPopup("project_new","POP_UP/pop_up", position = {'left':460,'top':309})
	else:
		logger = system.util.getLogger("myLogger")
		logger.info("project Data Saving Okay")	

Then add the modal setting into the openPopup function:

system.perspective.openPopup("project_new",
    "POP_UP/pop_up", 
    position = {'left':460,'top':309},
    modal = True
)

https://docs.inductiveautomation.com/display/DOC81/system.perspective.openPopup

2 Likes

Ok fine , it works but myself need to check that is it possible to write it as global script because I have almost 390+ views screen.

That sounds like poor design.

that's the required thing incase its was a entry form based on the different various area request we have developed it.

The project library of scripts aren't themselves "global" or "local" or "session" or "client" scope. They are just libraries. Their scope is the scope of whatever calls them. Simply pass any scope-specific variables from the origin to the library function via arguments.

understood , but However to call them we have open the view's right :thinking: , without disturbing the view is it possible ....

For example : here I'm opening the popup by URL so as default any popup up occurs on my screen the old page has to be modal popup.

is it possible , if so, how? Do you have any examples?

thanks !!!

Sure create a session message handler, in any view where you need to call your "global" script, you can use system.util.sendMessage() or if you need to return something from the script system.util.sendRequest()

1 Like