Search db and pop up

if system.db.runNamedQuery("IPList/IP_Insert",{"IPAddress"})==self.getSibling("IPAddressTXT").props.text:
	system.perspective.openPopup(1, IP/PopUp);

I am trying to search a db for a text and if it exits a pop up must display

Show us your named query.
If you are trying to pass a parameter it should look like,

params = {"ipAddress": IPAddress}
val = system.db.runNamedQuery("IPList/IP_Insert", params)
if val == self.getSibling("IPAddressTXT").props.text:
	system.perspective.openPopup(1, IP/PopUp)

For this to work your query would have to be a Scalor type and return a single value rather than a dataset.

Also,

  1. IP/Popup must be a string: "IP/Popup".
  2. Use of 1 as a Popup id is not a good idea.
  3. There's no need for the ; at the end of the line.
1 Like