Skip to main content
Solved

Client Script Error

  • September 2, 2020
  • 1 reply
  • 208 views

Forum|alt.badge.img+7

Hi,

I wrote client script to close request with alert based on some condition , below i mentioned client script code. It is working fine but multiple times the alert pop up is displayed as shown in below screen shot.

Can anyone please help me to figure out this issue.

Client script:

var req = getControlValue('request','request_id'); 
var pro = getControlValue('request_unit','product_id');
var user = setDBValue("USER_DEF19",pro,req);
var plc = getControlValue('request','user_def19');
var plcou = getDBValue("COUNT_PLACE",plc);
var cou =round(plcou,0);
if (cou > 0)
var s = setDBValue("REQ_STATUS",req);
alert("substation is shut down!!");

 

Thanks

Ramya

Best answer by Lee Pinchbeck

Hi @Ramya,

This would suggest that there are multiple actions taking place on close that are then triggering this script.

You would likely need to do a thorough analysis of everything that triggers at the same time of this script and check for any unexpected interactions.

Kind regards,

Lee Pinchbeck

1 reply

Lee Pinchbeck
Ultimate Hero
Forum|alt.badge.img+24
  • Ultimate Hero
  • Answer
  • November 13, 2020

Hi @Ramya,

This would suggest that there are multiple actions taking place on close that are then triggering this script.

You would likely need to do a thorough analysis of everything that triggers at the same time of this script and check for any unexpected interactions.

Kind regards,

Lee Pinchbeck