Asset tag generator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2024 09:26 PM - edited ‎09-06-2024 07:03 AM
Hi Team,
we have a requirement to create a utility to generate asset tags. So the requester can select how many asset tags need to be generated and then click submit. Upon submission, the utility should check existing asset tags and generate unique ones. I am planning to create a catalog item for this.
customer is doing this activity manually currently before asset receiving process. This automation would save some time and effort.
Any advice here would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 10:16 AM
Hi, did you ever figure out a solution for this? we are in the process of something similar but was having challenge keeping track of the last tag printed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 12:31 PM - edited ‎12-18-2024 12:33 PM
Hi @dvelloriy & @XiaoC ,
It would depend on your organization and how you already handle asset tags. Do you have all of your in-use or previously used asset tags populated on either cmdb_ci or alm_asset? Have you previously followed any sequential formatting or do you randomly generate asset tags?
If you have followed sequential formatting I'd create a system property that stores the "highest" asset tag and use a script to calculate the next X number of asset tags based on that property and store the new value in the properties to essentially "reserve" the generated values. You could run a query to check the availability of these tags such as
var gr = new GlideRecord('alm_asset')
gr.addEncodedQuery('asset_tagIN{comma seperated values}');
gr.query();
if(gr.getRowCount() > 0){
//handle error
}
Does this help?
Thanks,
Ben