The CreatorCon Call for Content is officially open! Get started here.

Check if field value changed from UI action?

snowtech1
Tera Expert

Hello,

Similar to 'changes()' on business rules (and) 'current/previous' objects on client scripts, is there an easy way to identify if a field value changed from a client side UI action?

Thanks in advance.

ctomasi

Michael.Fry

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Snow,



At client side, you can check as



var field1 = g_form.getControl('caller_id');


if(field1.changed)


{


//your code


}



Reference:


https://www.servicenowguru.com/scripting/business-rules-scripting/checking-modified-fields-script/


View solution in original post

2 REPLIES 2

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Snow,



At client side, you can check as



var field1 = g_form.getControl('caller_id');


if(field1.changed)


{


//your code


}



Reference:


https://www.servicenowguru.com/scripting/business-rules-scripting/checking-modified-fields-script/


If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.



If you are viewing this from the community inbox you will not see the correct answer button.   If so, please review How to Mark Answers Correct From Inbox View.