Question 294 of 481
Generating Unique Asset Tags with Prefix and Incrementing Number in ServiceNow
A developer is creating a custom table for tracking hardware assets. The table must have fields for asset tag, serial number, and purchase date. The developer wants to ensure that the asset tag is automatically generated using a prefix followed by an incrementing number. Which approach should the developer use?
Quick Answer
A business rule with a scripted counter is the right approach here because ServiceNow simply does not offer a built-in field type that auto-generates sequential, prefixed values the way some databases offer native auto-increment columns. Every record already gets a unique sys_id, but that identifier is a generated string rather than a meaningful sequential number, so it cannot be used to produce something like a readable, incrementing asset tag with a prefix attached. A business rule fills that gap by running a script, typically on insert, that looks at the existing records to find the highest current number already in use, increments it by one, and prepends the required prefix to form the new tag before the record is saved. This approach guarantees both uniqueness and proper ordering, since each new tag is calculated relative to what already exists rather than being assigned arbitrarily. The general principle to take from this is that whenever a requirement calls for a sequential, formatted identifier that does not already exist as a native field type on the platform, the answer is almost always a business rule, or comparable server-side script, that calculates and assigns that value based on existing data at the moment the record is created, rather than expecting the platform to generate it automatically.
⚠ Common exam trap
Many exam-takers assume sys_id is sequential or that dictionary overrides can generate values, but ServiceNow requires explicit scripting for auto-increment fields, and sys_id is a random GUID, not a sequential number.
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
✓
Create a business rule that calculates the asset tag using a script that increments a counter
ServiceNow does not have a built-in auto-increment field type, so a business rule must be used to generate a sequential asset tag. The script typically queries the table for the maximum existing number, increments it, and prepends the prefix (e.g., 'AST-0001'). This ensures uniqueness and proper sequencing without relying on sys_id, which is not sequential.
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 a calculated value that dot-walks to a number table
Why it's wrong here
Dot-walking is for referencing related record fields.
- ✗
Set the default value of the asset tag field to 'AST-' + sys_id
Why it's wrong here
Default values are static or scripted but cannot reliably increment.
- ✓
Create a business rule that calculates the asset tag using a script that increments a counter
Why this is correct
A business rule can generate a unique, incrementing asset tag.
- ✗
Configure a dictionary override on the asset tag field to auto-generate
Why it's wrong here
Dictionary overrides modify field attributes, not generate values.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on SNOW-CAD
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A developer created the business rule shown in the exhibit to auto-generate asset tags. However, when a new asset is created, sometimes the generated tag is a duplicate of an existing tag. What is the most likely cause?
medium- A.The condition '!current.u_asset_tag' fails when the field is empty
- B.The script does not account for records with null asset tags
- C.The script does not handle the scenario when no asset tag exists
- ✓ D.The query uses 'CONTAINS' which may match unintended tags, and ordering by sys_created_on may not guarantee the highest number
Why D: The script uses a glide query with 'CONTAINS' to find the highest existing asset tag number, which can match unintended tags (e.g., 'TAG-10' matching 'TAG-1001'), and ordering by 'sys_created_on' does not guarantee the highest numeric suffix. This leads to duplicate tags when the generated number is already in use but not detected as the maximum.
Last reviewed: Jun 11, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.