SNOW-CSA Self-Service and Automation Practice Question
This SNOW-CSA practice question tests your understanding of self-service and automation. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. 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 Policy condition:
```javascript
if (g_form.getValue('department') == 'IT' && g_form.getValue('category').indexOf('hardware') != -1) {
g_form.setMandatory('cost_center', true);
} else {
g_form.setMandatory('cost_center', false);
}
```
A UI Policy is configured to run on load and on change for the department and category variables. When a user selects department 'IT' and category does not contain 'hardware', what is the behavior regarding the 'cost_center' variable?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The cost_center variable becomes optional
Option C is correct because the UI Policy script sets the cost_center variable to optional only when the department is 'IT' and the category does not contain 'hardware'. The condition 'category does not contain hardware' is evaluated as true for any category value that does not include the substring 'hardware', triggering the 'mandatory=false' action on the cost_center variable. This makes the field optional (i.e., not required) when the condition is met.
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 cost_center variable is hidden
Why it's wrong here
The UI Policy does not hide the variable.
✗
The cost_center variable becomes mandatory
Why it's wrong here
Only when both conditions are true does mandatory become true.
✓
The cost_center variable becomes optional
Why this is correct
Since the condition is false, the else branch sets mandatory to false, making it optional.
Related concept
Read the scenario before looking for a memorised answer.
✗
The cost_center variable becomes read-only
Why it's wrong here
The UI Policy does not set read-only; it sets mandatory.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often confuse 'does not contain' with 'is not' or 'does not equal', and may incorrectly assume the condition only applies when category is empty, or that the policy hides the field instead of just making it optional.
Detailed technical explanation
How to think about this question
UI Policies in ServiceNow run client-side JavaScript on the specified events (onLoad, onChange) and can modify field properties like mandatory, visible, and read-only. The condition 'category does not contain hardware' uses the 'contains' operator, which performs a case-insensitive substring match. If the category field is empty or has any value without 'hardware', the condition is true, and the mandatory attribute is set to false, overriding any default mandatory setting from the dictionary or catalog item definition.
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-CSA 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.
Self-Service and Automation — This question tests Self-Service and Automation — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The cost_center variable becomes optional — Option C is correct because the UI Policy script sets the cost_center variable to optional only when the department is 'IT' and the category does not contain 'hardware'. The condition 'category does not contain hardware' is evaluated as true for any category value that does not include the substring 'hardware', triggering the 'mandatory=false' action on the cost_center variable. This makes the field optional (i.e., not required) when the condition is met.
What should I do if I get this SNOW-CSA question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
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-CSA 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-CSA 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.