- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2025 09:45 AM
We have a business rule that automatically generates asset tags for assets.
When adding an asset through the form, the numbers generate correctly. However, when bulk-loading assets using an Excel sheet, the business rule sometimes doesn’t trigger, or it generates duplicate asset tag numbers.
It seems that the transform map is not correctly recognizing the database operations.
Has anyone encountered a similar issue or have any suggestions?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2025 07:29 AM
Hello @mankali_kal ,
By any chance, are your asset tags following a fixed pattern, e.g. a prefix like "ASSET" followed by an incrementing number?
If that is the case you could simply use the built in auto numbering feature.
Step 1: go to Number Maintenance and create a new entry for the Asset table. Define a prefix and the number of digits.
Step 2: in the Dictionary record for the asset_tag field, set the default value configuration as shown below:
Step 3: disable your custom Business Rule
Result: ServiceNow will take care of assigning unique numbers automatically
If for some reason you do not want to enable this feature and the suggestions provided by @Robbie don't work out please provide a screen shot of the Business Rule script (I assume it's configured to run BEFORE INSERT?) and, if your Excel upload uses Transform Map scripts, share those as well.
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2025 05:35 AM
Hi @mankali_kal,
Thinking out loud, a couple of points you may want to check.
The first and most obvious point, on the transform map, there's a checkbox 'Run business rules' - Confirm if this is checked or not to determine if the Business Rule is executed. You may want to handle the logic in the Transform map itself and therefore uncheck this.
Secondly, and probably where the unexpected behaviour is occurring, do you have 'coalesce' set to true on any of the fields such as Asset tag for example? If so, this would actually trigger an update rather than an insert meaning if your business rule runs on insert only, that's why you experience the BR to run sometimes, and not at others.
To help others (and for me to gain recognition for my efforts), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2025 07:29 AM
Hello @mankali_kal ,
By any chance, are your asset tags following a fixed pattern, e.g. a prefix like "ASSET" followed by an incrementing number?
If that is the case you could simply use the built in auto numbering feature.
Step 1: go to Number Maintenance and create a new entry for the Asset table. Define a prefix and the number of digits.
Step 2: in the Dictionary record for the asset_tag field, set the default value configuration as shown below:
Step 3: disable your custom Business Rule
Result: ServiceNow will take care of assigning unique numbers automatically
If for some reason you do not want to enable this feature and the suggestions provided by @Robbie don't work out please provide a screen shot of the Business Rule script (I assume it's configured to run BEFORE INSERT?) and, if your Excel upload uses Transform Map scripts, share those as well.
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2025 04:13 AM
Hello @Robert H
Thanks for your response.
I am not currently not aware of any risks associate with using numbering system. do you forsee any potential risks?
My requirement is to bulk load the asset information, Automatically generate asset tag, and send a response back to the requestor with the generated tag numbers.
if there are no identified risks with this approach, I'm comfortable proceeding, as it would meet the requirement effectively.
Please confirm.
Thanks,
Kalyani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2025 04:17 AM
Hello @Robert H ,
Thanks for your response.
I’m not currently aware of any risks associated with using the numbering system. Do you foresee any potential risks?
My requirement is to bulk load asset information, automatically generate asset tags, and send a response back to the requester with the generated tag numbers.
If there are no identified risks with this numbering approach, I’m comfortable proceeding, as it would meet the requirement effectively.
Pease confirm.
Thanks,
Kalyani