In ServiceNow, a UI policy has access to the script's prior value.

Prepare effectively for the ServiceNow CAD certification. Study with detailed questions and explanations. Enhance your skills and knowledge for success in your exam!

Multiple Choice

In ServiceNow, a UI policy has access to the script's prior value.

Explanation:
In UI policies, decisions about showing, hiding, making fields mandatory, or read-only are made using the form’s current values on the client side. The policy script does not receive or track the previous value of a field. It only has access to the present state, typically via g_form.getValue or similar, to determine how to apply the policy. If you need to react to a value changing from its previous state, you should use an onChange client script, which provides the oldValue (previous value) parameter so you can compare oldValue and newValue and act accordingly. UI policy scripts don’t have that prior-value information, so the idea that a UI policy has access to the script’s prior value isn’t correct.

In UI policies, decisions about showing, hiding, making fields mandatory, or read-only are made using the form’s current values on the client side. The policy script does not receive or track the previous value of a field. It only has access to the present state, typically via g_form.getValue or similar, to determine how to apply the policy.

If you need to react to a value changing from its previous state, you should use an onChange client script, which provides the oldValue (previous value) parameter so you can compare oldValue and newValue and act accordingly. UI policy scripts don’t have that prior-value information, so the idea that a UI policy has access to the script’s prior value isn’t correct.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy