Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Number Duplicate Issue on Custom Table

Ratan B
Tera Contributor

Hi All,

For custom table we have imported large number of records from the other tool as Migration part, but after data ingestion if we are going to create a new entry I can see number is being duplicated. In Number maintenance table I gave as Number of digits 7 and Number as 1000. 

 

Example :- Even if the Number AML0001010 is already available in table (which is inserted as part of Data Migration through Transform Map), still it inserted one record with the same number AML0001010 while I was creating the record by clicking on new button.

 

Any suggestion to avoid this...?

Note : Added javascript:global.getNextObjNumberPadded(); as default value to the Number field.

 

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Data import can mess this up, Basically your import have entered data form say, 1 - 50 but in number maintenance it is stuck at 25, so the new data entered is 26 which is already present.

Try checking the counted for this table on number maintenance and see if you can force increate it.

find_real_file.png

Try and increate the counter based on the data already in the table.

check this as an alternate solution

Enforcing unique numbering (servicenow.com)

-Anurag

-Anurag

View solution in original post

1 REPLY 1

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Data import can mess this up, Basically your import have entered data form say, 1 - 50 but in number maintenance it is stuck at 25, so the new data entered is 26 which is already present.

Try checking the counted for this table on number maintenance and see if you can force increate it.

find_real_file.png

Try and increate the counter based on the data already in the table.

check this as an alternate solution

Enforcing unique numbering (servicenow.com)

-Anurag

-Anurag