We have some part numbers that were set up years ago that we need to add Serial Numbers to. Right now they are tracking the serial numbers in a spreadsheet. I am trying to create a serial number tracker using the UD12 table. I have a function that will look up the next unused serial number for the part (all our SN use the same format) and return it. I added a button to my SN entry form to get the next serial number after the part is entered. I’m not sure on how to hook it up correctly. I can click the button and the blue line goes across the top like it’s thinking but nothing is returned, and the function doesn’t show as having run in the system monitor.
Function
On Click event:
Parameters:
Output:



