SNOW-CAD User Interface Development Practice Question
A Service Portal widget is failing to update a reference field on a form after a user selects a value from a reference picker. The developer reviews the widget's client controller and sees the following code snippet: $scope.c.data.selectedItem = value; The server script expects 'selectedItem' to be a sys_id string, but it is receiving an object. What is the most likely cause?
⚠ Common exam trap
A common mix-up: candidates assume the reference picker returns a simple string (the sys_id) and overlook that Service Portal reference fields return an object with both value and display properties, leading them to choose options about scope naming or assignment syntax instead of the data format mismatch.
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 reference field returns an object with 'value' and 'display' properties; the code should extract the sys_id.
When a reference picker returns a value in Service Portal, it typically provides an object containing both the display value and the sys_id (e.g., {value: 'sys_id', display: 'name'}). The client controller code assigns this entire object to $scope.c.data.selectedItem, but the server script expects a plain sys_id string. The developer must extract the sys_id property (e.g., value.sys_id or value.value) before assigning it to the scope variable.
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 server script expects the parameter in a different scope variable, like $scope.c.data.item.
Why it's wrong here
The server script reads from $scope.c.data, which matches.
- ✗
The $scope.c.data assignment is incorrect; it should be $scope.data.
Why it's wrong here
$scope.c is correct for client-server data in Service Portal.
- ✗
The client controller is not allowed to set $scope.c variables.
Why it's wrong here
Client controllers can set $scope.c variables.
- ✓
The reference field returns an object with 'value' and 'display' properties; the code should extract the sys_id.
Why this is correct
Reference fields return an object; the sys_id is typically in value or sys_id property.
Go deeper
Related to this question
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 →
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.