Courseiva
Working with DatamediumMultiple ChoiceObjective-mapped

SNOW-CAD Working with Data Practice Question

Exhibit

var gr = new GlideRecord('incident');
gr.addQuery('active', true);
gr.addQuery('priority', '1');
gr.setLimit(10);
gr.query();
while(gr.next()) {
  gs.info(gr.number);
}

Refer to the exhibit. A developer runs this script and notices it only returns 10 incidents even though there are more than 10 active priority 1 incidents. What is the reason?

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

The setLimit(10) method limits the number of records returned.

The script uses the setLimit(10) method, which restricts the GlideRecord query to return only 10 records, even though there are more matching records. Option A is incorrect because the script does not limit by session. Option B is incorrect because there is no filter for created today. Option C is incorrect because the issue is about the limit, not joins.

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 script only gets incidents from the current session.

    Why it's wrong here

    Session does not affect query results.

  • The script only retrieves incidents created today.

    Why it's wrong here

    No date filter is applied.

  • The incident table is not joined with any other table.

    Why it's wrong here

    Joins are not causing the limit.

  • The setLimit(10) method limits the number of records returned.

    Why this is correct

    setLimit restricts the GlideRecord query to 10 records.

About these practice questions

Courseiva writes every SNOW-CAD question from scratch — 481 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.