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

Maik Skoddow
Tera Patron
Tera Patron

Hi

your first Client Script could add any additional string of chars which makes no sense and would never be entered by the user. Your second Client Script can check whether the changed value ends with that special string and if so remove that special string and if not perform the change.

Maik

Hi @Maik Skoddow 

That's a nice idea. But my fields are not string fields. They are drop down fields.

How can we do this?

 

Hi @Maik Skoddow 

That's a nice idea. But my fields are not string fields. They are dropdown fields.

How can I do that?

 

In that case, you'll need another place where to store the flag in case the first script was firing. For example, in the window object. 

Maik