- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 11:07 PM
How to remove prefix for number variables for existing records in Incident table,
Example: usually number like INC0010043, but my requirement is to remove prefix "INC" for existing records and number should be like 0010043.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2022 12:00 AM
I would inform customer that this requirement should not be taken as it disturbs the OOB number maintenance + prefix logic on incident table
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 11:12 PM
you can write a script, algorithm below
glide record on incident
var numberstring = grinc.number
incnumsubstring = substring(take number after first 3 characters of numberstring).
set grinc.number = incnumsubstring
This will only update existing records, if you want all future records to also not have prefix, then you need to update the prefix to empty.
But may I ask why this is being attempted ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 11:16 PM
client requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 11:25 PM
is that code for only one record or for all existing records?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 11:29 PM
its a gliderecord so it will apply to all records that are part of the query