Courseiva
Integrating and managing application datahardMultiple ChoiceObjective-mapped

SNOW-CAD Integrating and managing application data Practice Question

Exhibit

Refer to the exhibit.

Transform map script:
```
(function runTransform0(source, target, map, log) {
    target.setValue('short_description', source.u_summary);
    target.setValue('description', source.u_description);
    target.setValue('category', source.u_category);
})(source, target, map, log);
```

The transform map fails when the source field 'u_summary' is null. What is the best way to prevent this error?

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 null check before setting: if(source.u_summary) target.setValue('short_description', source.u_summary);

It adds a null check before setting the value, preventing the transform map from failing when source.u_summary is null. Option A is incorrect because it does not handle null, which would still cause an error. Option C is incorrect because 'return true;' does not address null values. Option D is incorrect because mapping to a system field like 'sys_created_by' avoids the null issue but is not the best practice; using a null check is the appropriate approach.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use target.short_description = source.u_summary instead

    Why it's wrong here

    Direct assignment may also fail on null; setValue is acceptable.

  • Add a null check before setting: if(source.u_summary) target.setValue('short_description', source.u_summary);

    Why this is correct

    Null check prevents the script from erroring when the source field is empty.

  • Add a 'return true;' statement at the end

    Why it's wrong here

    Return value does not prevent null errors.

  • Map to a system field like 'sys_created_by'

    Why it's wrong here

    This is unrelated to null handling.

About these practice questions

One of 481 original SNOW-CAD 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 →

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.