With the serial number handler you can import new serial numbers and export existing serial numbers. This can also be used to edit specific serial numbers by exporting them and re-importing them.
NOTE: Taken serial numbers are not affected by import.
NOTE: Exported serial numbers prior to WATS Server version 21.2, can not be imported in WATS 21.2
Reserving serial numbers
After exporting a range of serial numbers, you can edit the range to reserve specific serial numbers.
To create a reservation
- In XML; add the Reservation attribute with a generated GUID to the SN element.
- In CSV; add a generated GUID in the Reservation column.
When creating a new reservation you can optionally set ReservedUTC, Station, and SiteCode. SiteName is read-only. You only need to set these on one of the serial numbers. If set on multiple serial numbers to different values the highest value is used.
The Reservation GUID must be one that does not already exist and you cannot add a serial number to an existing reservation. The optional fields cannot be changed after the reservation has been created.
This XML example reserves 13370001-13370005:
<SerialNumbers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SerialNumberType="RunningSN" Version="2">
<SN id="13370001" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" SiteCode="00" />
<SN id="13370002" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" />
<SN id="13370003" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" />
<SN id="13370004" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" />
<SN id="13370005" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" />
<SN id="13370006" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370007" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370008" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370009" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370010" GeneratedUTC="2021-11-25T13:32:13.06" />
</SerialNumbers>
Freeing reserved serial numbers
After exporting a range of serial numbers, you can edit the range to free specific reserved serial numbers.
To free a reserved serial number
- In XML; remove the Reservation attribute.
- In CSV; empty the Reservation column.
This XML example frees 13370001:
<SerialNumbers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SerialNumberType="RunningSN" Version="2">
<SN id="13370001" GeneratedUTC="2021-11-25T13:32:13.06" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" StationName="WATS default server" SiteCode="00" />
<SN id="13370002" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" StationName="WATS default server" SiteCode="00" />
<SN id="13370003" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" StationName="WATS default server" SiteCode="00" />
<SN id="13370004" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" StationName="WATS default server" SiteCode="00" />
<SN id="13370005" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" StationName="WATS default server" SiteCode="00" />
<SN id="13370006" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370007" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370008" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370009" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370010" GeneratedUTC="2021-11-25T13:32:13.06" />
</SerialNumbers>
Taking serial numbers
After exporting a range of serial numbers, you can edit the range to mark specific serial numbers as taken.
To take a serial number
- In XML; add the TakenUTC attribute with the date and time the serial number was taken.
- In CSV; add the date and time the serial number was taken to the Taken UTC date/time column.
When taking a serial number you can optionally set RefSN and RefPN.
This XML example takes 13370005 and 13370006:
<SerialNumbers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SerialNumberType="RunningSN" Version="2">
<SN id="13370001" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370002" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" StationName="WATS default server" SiteCode="00" />
<SN id="13370003" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" StationName="WATS default server" SiteCode="00" />
<SN id="13370004" GeneratedUTC="2021-11-25T13:32:13.06" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" StationName="WATS default server" SiteCode="00" />
<SN id="13370005" GeneratedUTC="2021-11-25T13:32:13.06" TakenUTC="2021-11-26T07:55:00" RefSN="123456790" RefPN="100200" Reservation="e4160e06-59d9-4d5f-b2ac-9751ab251016" ReservedUTC="2021-11-26T07:42:00" Station="TestStation" StationName="WATS default server" SiteCode="00" />
<SN id="13370006" GeneratedUTC="2021-11-25T13:32:13.06" TakenUTC="2021-11-26T07:55:00" RefSN="123456789" RefPN="100200" />
<SN id="13370007" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370008" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370009" GeneratedUTC="2021-11-25T13:32:13.06" />
<SN id="13370010" GeneratedUTC="2021-11-25T13:32:13.06" />
</SerialNumbers>
Comments
0 comments
Please sign in to leave a comment.