Check if value is updated by user or not

Sai Sai
Kilo Contributor

Hi,

In onchange client script i wanted to check if the field value is updated directly by user or by another client script.

For example there are 3 fields a,b,c

based on value of b, the value of c will automatically change. (first client script on field b)

Now i wrote a onchange client script on field c. 

My requirement now is : If I manually change value of c then client script should trigger. If the value of c is updated by first client script mentioned above then my new client script should not trigger.

How can i determine it?

12 REPLIES 12

Anubhav24
Mega Sage
Mega Sage

To see if the field is manually updated you can use the keyin and keyout events of javascript as well , try with those I am not sure on the exact event names in javascript

Please Let me know if you find any ways

Community Alums
Not applicable

I got this from user 0YL on slack:

You might be able to use isLiveUpdating() to see if it is updated directly by user or by another client script.

https://developer.servicenow.com/dev.do#!/reference/api/tokyo/client/c_GlideFormAPI#r_GF-isLiveUpdat...