Solved

Duplicate Serial Numbers

  • 7 March 2022
  • 5 replies
  • 206 views

Userlevel 3
Badge +7

I have a user requesting that we make it so that there can’t be duplicate serial numbers in IFS where there are different part numbers. As far as I can tell, this seems to be a feature of IFS. Is my thinking on this correct? We have a few cases with duplicate serial numbers but different part numbers associated with each. 

icon

Best answer by Thom C 7 March 2022, 22:01

View original

This topic has been closed for comments

5 replies

Userlevel 7
Badge +18

Please check the answer of the below community thread and check whether it is related to your query
Serailaized Part in Inventory | IFS Community

Userlevel 3
Badge +7

It is slightly related but it doesn’t seem to answer whether it is expected or not. 

Userlevel 3
Badge +8

As far as I can tell, this seems to be a feature of IFS. Is my thinking on this correct? We have a few cases with duplicate serial numbers but different part numbers associated with each. 

You are correct - this is by design. 

An interesting topic for a Custom Event. On insert check the Serial No value against the table and error out if the new value exists. 

Some places IFS creates the Serial Number (e.g. in advance on Shop Orders). I suppose certain background operations would just fail if you already had a Serial No value for a different part when one of those processes executed. 

Userlevel 3
Badge +7

That is very interesting. I wonder how one would go about creating such an event. 

Userlevel 3
Badge +8

 I wonder how one would go about creating such an event. 

Leaving aside the framework necessary to create a New Custom Event upon Insert to PART_SERIAL_CATALOG_TAB you might be able to do something like

DECLARE

V_DUPLICATE    NUMBER;

BEGIN

SELECT COUNT(*) FROM PART_SERIAL_CATALOG_TAB WHERE SERIAL_NO = new:SERIAL_NO INTO V_DUPLICATE;

IF

V_DUPLICATE > 0 THEN Error_SYS.Item_General('Serial No value exists',' ',' ');

END IF;

END;

Invoke the IFS  ERROR handling PROCEDURE Error_SYS.Item_General() passing parameters to create the error message prompt.  

I make no claim that the pseudocode above is suitable for any purpose, much less won’t corrupt your data and destroy your environment.