SNOW-CSA Service Catalog and Workflows Practice Question
During a workflow, a catalog item's quantity variable 'qty' must be validated to be between 1 and 10. If the value is outside this range, the request should be rejected with a message. Which approach should the administrator take?
⚠ Common exam trap
Many exam-takers confuse client-side validation (like UI Policies or Client Scripts) with server-side enforcement, assuming that showing an error message on the client side is sufficient to reject the request, but only a server-side script like 'Before Order' can truly abort the transaction.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Add a 'Before Order' script in the catalog item that validates and aborts if invalid.
The 'Before Order' script runs server-side when the user clicks the 'Order Now' button, allowing the administrator to validate the 'qty' variable and use `gs.addErrorMessage()` followed by `current.abortAction()` to reject the request with a message. This approach ensures the validation occurs at the point of submission, before the request is processed, and provides immediate feedback to the user.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add a 'Before Order' script in the catalog item that validates and aborts if invalid.
Why this is correct
Before Order scripts run on submit and can abort the request with an error message.
- ✗
Create a Catalog Client Script with 'onChange' event to validate and show error.
Why it's wrong here
Client script cannot abort the request; it only shows messages.
- ✗
Create a UI Policy to set the variable as mandatory and add a condition.
Why it's wrong here
UI Policy cannot reject the request, only show or hide fields.
- ✗
Set the variable's 'Type' to 'Integer' and add a 'Min' and 'Max' attribute.
Why it's wrong here
Min/Max attributes are not native to variable types.
Go deeper
Related to this question
About these practice questions
One of 504 original SNOW-CSA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.