The most likely cause is that the UI Script is not being called because it is not associated with any form or event. A UI Script in ServiceNow is a reusable client-side script that does not execute on its own; it must be explicitly invoked by a Client Script, UI Policy, or a form event like onChange or onLoad. In this scenario, the Client Script alone cannot trigger the UI Script without a direct call to it, so when the priority field changes to '1', the UI Script’s logic to set urgency and impact to '1' never runs. This question tests your understanding of UI Script execution and the dependency between Client Scripts and UI Scripts, a common trap on the ServiceNow Certified Application Developer CAD exam where candidates assume UI Scripts run automatically. Remember the key distinction: Client Scripts are event-driven, but UI Scripts are passive libraries that require explicit invocation. A helpful memory tip is "UI Scripts are like library books—they only work when someone opens and reads them."
SNOW-CAD Designing interfaces and user experiences Practice Question
This SNOW-CAD practice question tests your understanding of designing interfaces and user experiences. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
// UI Script: myCustomUIScript
function onLoad() {
var priority = g_form.getValue('priority');
if (priority == '1') {
g_form.setValue('urgency', '1');
g_form.setValue('impact', '1');
}
}
// Client Script: onChange - priority
function onChange(control, oldValue, newValue, isLoading) {
if (newValue == '1') {
g_form.setValue('urgency', '1');
g_form.setValue('impact', '1');
}
}
A developer created a UI Script and a Client Script as shown. Both scripts set urgency and impact to '1' when priority is '1'. However, when the priority is changed to '1' on an existing record, the urgency and impact fields do not update. What is the most likely cause?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The UI Script is not being called because it is not associated with any form or event
A UI Script is a reusable client-side script that must be explicitly called from a Client Script, UI Policy, or form event to execute. In this scenario, the UI Script is not associated with any form or event, so it never runs when the priority field changes. The Client Script alone cannot invoke the UI Script without a direct call, leaving the urgency and impact fields unupdated.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✓
The UI Script is not being called because it is not associated with any form or event
Why this is correct
UI Scripts are not automatically executed; they must be called from a Client Script or UI Policy.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
✗
The priority field is not a choice field, so onChange does not fire
Why it's wrong here
onChange fires for any field change, not just choice fields.
✗
The Client Script function name is incorrect; it should be 'onChangePriority'
Why it's wrong here
The function name 'onChange' is correct for a client script of type onChange.
✗
The g_form API is deprecated and no longer works
Why it's wrong here
g_form is still valid in ServiceNow.
Common exam traps
Common exam trap: answer the scenario, not the keyword
ServiceNow often tests the distinction between defining a script and executing it, trapping candidates who assume that simply creating a UI Script will automatically run it on field changes without an explicit trigger.
Detailed technical explanation
How to think about this question
UI Scripts are stored as sys_ui_script records and are loaded into the browser's global scope but do not execute automatically. They must be invoked via a Client Script using g_scratchpad or by calling the UI Script's function directly. A common real-world scenario is when a developer writes a reusable function in a UI Script but forgets to call it from the onChange Client Script, leading to no visible effect despite the UI Script being correctly defined.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the SNOW-CAD exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Designing interfaces and user experiences — This question tests Designing interfaces and user experiences — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The UI Script is not being called because it is not associated with any form or event — A UI Script is a reusable client-side script that must be explicitly called from a Client Script, UI Policy, or form event to execute. In this scenario, the UI Script is not associated with any form or event, so it never runs when the priority field changes. The Client Script alone cannot invoke the UI Script without a direct call, leaving the urgency and impact fields unupdated.
What should I do if I get this SNOW-CAD question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This SNOW-CAD practice question is part of Courseiva's free ServiceNow certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SNOW-CAD exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.