How to check any variable modified or not in catalog client script on service portal and native UI?

Alok Yadav
Tera Contributor

Hi Now Community,

I have a requirement to identify form changes or we can say any field is changed or not on a catalog item on the service portal and native UI while submitting the form. Like We have g_form.modified so that we can use it only in the client script, not in the catalog client script, do we have something similar for the catalog client script.

Note: I know 2 alternatives like creating a hidden check box field and using the onChange catalog client script or using a script include in some cases, we can do we have any pre-define function or keyword that can check modification.

2 REPLIES 2

Murthy Ch
Giga Sage

Hi @Alok Yadav 

If you have already set the default value for variables then you check using oldValue and newValue.

 

Thanks,

Murthy

 

Thanks,
Murthy

Thanks For Reply Murthy,

No, there is no default value. and I need to check variable value change onSubmit.