How to Auto-increement Asset Tag?

Michelle Ricafr
Kilo Contributor

Hi,

1. I tried to follow steps on Add auto-numbering records in a table, added prefix (AST) and it worked. My first entry for example is AST0010001, on my 2nd entry the asset tag became AST0010003, 3rd entry AST0010005 and so on. The entry is not continuous as AST0010001, AST0010002, AST0010002 and so on.

2. Even I don't save the entry the auto-numbering continuous like that. So I tried the steps on Prevent numbering gaps after doing the steps, the Asset tag auto-numbering is not working, no data generated. After revert back steps on Prevent number gaps the asset tag worked again.

Please help.

Thanks,

Michelle

11 REPLIES 11

This should be working, The number will be generated only after you insert the record. Please check once and let me know.

Did it work?

First, I disable the Prevents unused number in System Properties > Sytem and uncheck Assign a task number only upon insert (prevents unused numbers).

Second, I create new record in hardware asset (JGSSMG0010005) and I do not save it. Then I create again a new record it generate asset tag JGSSMG0010006. The counter continuous to generate value even I do not insert/save the record.

Third, I enable Prevents unused number in System Properties > Sytem and check Yes Assign a task number only upon insert (prevents unused numbers).

Fourth, I create new record in hardware asset and no asset tag value is generated.

 

Thanks,

Deepak Ingale1
Mega Sage

Hi,

 

This property will work for TASK extended records only.

Also, if you want to have unique asset number, you cant rely on the way ServiceNow implements the logic for generating the number.

There are rare chances that with that logic and concurrent transaction, you may see duplicate numbers being used for records.

 

If I have to generate something, I would generate the Random Number and have it assigned to the Asset

 

https://docs.servicenow.com/bundle/london-servicenow-platform/page/product/knowledge-management/reference/knowledge-article-duplicate-numbers.html 

https://docs.servicenow.com/bundle/london-platform-administration/page/administer/field-administration/concept/c_EnforcingUniqueNumbering.html

 

If requirement is not to generate the serial numbers , i will definitely go with own logic of custom number generation !!!

Hi, do you mean that the Prevent Unused Number is only applicable in Task extended records? Incident? Change request? Problems? So there is no way I can control the unused number in Asset Management auto-numbering?