SNOW-CSA UI, Navigation and Forms Practice Question
Exhibit
var gr = new GlideRecord('incident');
gr.addQuery('state', 3);
gr.addQuery('priority', '<=', 3);
gr.addNotNullQuery('assigned_to');
gr.query();
while(gr.next()){
gs.print(gr.getDisplayValue('number'));
}Refer to the exhibit. This script runs in a background script. Which set of records will be printed?
⚠ Common exam trap
The trap here is that candidates often overlook the 'assigned_toISNOTEMPTY' condition or misinterpret the '^' as an OR operator, leading them to select an option that includes records missing one of the required filters.
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
✓
Incidents with state=3 AND priority<=3 AND assigned_to is not null
The script uses a GlideRecord query on the Incident table with an encoded query string 'state=3^priority<=3^assigned_toISNOTEMPTY'. This filters for records where state equals 3 (which corresponds to 'On Hold' in the default incident state model), priority is less than or equal to 3, and the assigned_to field is not empty. The while loop iterates over the matching records and prints each one, so only incidents meeting all three conditions are output.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Incidents with state=3 AND assigned_to is not null
Why it's wrong here
The priority condition is also applied.
- ✓
Incidents with state=3 AND priority<=3 AND assigned_to is not null
Why this is correct
All three conditions are combined with AND.
- ✗
Incidents with priority<=3
Why it's wrong here
State and assigned_to conditions are also applied.
- ✗
All incidents
Why it's wrong here
The query has multiple conditions restricting the results.
Go deeper
Related to this question
About these practice questions
This SNOW-CSA question is part of Courseiva's 504-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.