How to Auto-increement Asset Tag?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 07:22 PM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 09:35 PM
Hi Michelle,
You can refer one of the record that have auto numbering.
Example: Goto Application Navigator >> Dictionary >> look for the one on alm_contract and filed name number.
Create the field same as above and use Default Value selected and use dynamic field values "Get Next Padded Number" or "Get Number" for generating the numbers.
Then you can use below for Record numbering:
https://docs.servicenow.com/bundle/jakarta-platform-administration/page/administer/field-administration/concept/c_ManagingRecordNumbering.html?title=Managing_Record_Numbering#Preventing_Numbering_Gaps
https://docs.servicenow.com/bundle/kingston-platform-administration/page/administer/field-administration/task/t_AutoNumberingRecordsInATable.html
https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/administer/field_administration/task/t_PreventNumberingGaps.html
Thanks,
Giri G

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2018 04:06 PM
Michelle,
I'm making an assumption here that you chose alm_hardware as the table in the number maintenance record. If I'm correct, you are getting gaps in the numbering because the auto number is incrementing for the parent table alm_asset and the extended table you've placed it on alm_hardware.
Here's how I would tackle this. I'd either create the auto number on alm_asset and configure the prefix as you've done. Then use the default value code from the number field as the default value in asset_tag. Another solution is to create an On After business rule to capture the value in the number field form alm_asset, use a script to add prefix the desired "AST" and write it to the asset_tag attribute and alm_hardware. Using this method you can have distinct prefixes for software entitlements and hardware assets. Both are extended from the parent table alm_asset.
Note, you'll still get gaps if you create both Software Entitlements and Hardware records. Each software entitlement and hardware record entered will increment the number attribute on the parent alm_asset record.