Formatted Search - Auto Lot Number Assignment with Date Code
Quote from Administrator on June 4, 2020, 2:07 pmIn the olden days, lot numbers themselves used to contain attributes about the lot contents. In today's day and age, this is no longer necessary. In SAP Business One, you can have unlimited attributes associated with a lot number. Therefore, intelligent lot numbers are not really required anymore.
This query was designed to be a formatted search attached to the Lot number field, when assigning new lots. New lots get created upon material receipts from Purchasing or Production. Simply attach this query as a Formatted Search to the lot number field. Automatic lot numbers will be generated when you press the Formatted Search lookup button in the Lot number field.
This query is really very simple. It assigns a date - random number. The random number generated is from 0 to 1000 followed by 14 decimal places. The odds of the system generating the exact same number on the exact same day are minute. You would have a greater chance of being struck by lightning while being bitten by a shark than the same number ever being generated!
SELECTÂ CURRENT_DATE || '-' || RAND()*1000 FROM DUMMY
In the olden days, lot numbers themselves used to contain attributes about the lot contents. In today's day and age, this is no longer necessary. In SAP Business One, you can have unlimited attributes associated with a lot number. Therefore, intelligent lot numbers are not really required anymore.
This query was designed to be a formatted search attached to the Lot number field, when assigning new lots. New lots get created upon material receipts from Purchasing or Production. Simply attach this query as a Formatted Search to the lot number field. Automatic lot numbers will be generated when you press the Formatted Search lookup button in the Lot number field.
This query is really very simple. It assigns a date - random number. The random number generated is from 0 to 1000 followed by 14 decimal places. The odds of the system generating the exact same number on the exact same day are minute. You would have a greater chance of being struck by lightning while being bitten by a shark than the same number ever being generated!
SELECTÂ CURRENT_DATE || '-' || RAND()*1000 FROM DUMMY
