Why Barcodes?
Barcodes play an important role in delivery and parcel management systems
Tracking Parcels: Barcodes are used to track parcels from the moment they are picked up to the point of delivery. Each parcel is assigned a unique barcode that can be scanned at every point in the delivery process. This enables real-time tracking of the parcel, so customers and businesses can stay informed about its location and estimated time of delivery.
Sorting and Routing: Barcodes are used to sort and route parcels to their intended destinations. Sorting facilities use barcode scanners to scan each parcel as it arrives and sort it according to its destination. This ensures that parcels are delivered to the correct location and on time.
Proof of Delivery: Barcodes are used to provide proof of delivery. Delivery drivers can scan the barcode on a parcel when it is delivered to confirm that it has been received. This provides a record of the delivery and helps to prevent disputes over whether a parcel was delivered.
In this blog we are exploring on creating a parcel label which we would leverage in the subsequent blog
Conceptual Architecture View:
Platform Setup:
- Data source / Sharepoint List setup: Setup a sharepoint list with some dummy data with the fields OrderID, Consignment ID (concatenation of OrderID, first 2 char of origin and destination Postcode), Origin PostCode, Destination Postcode, Packing Units, Cost and Status as a choice column
- Basic selection screen: The goal is to filter Orders that are not printed for labels. Have a user selection dropdown which filters distinct Consignment IDs but selects only if the status of the order is set as "01".
Distinct(Filter(GeoMap,Status.Value = "01"),'Consignment ID')
The onvisible property of the field is set not to be available for the print command
Not(Parent.Printing)
- Created a Group to represent the Parcel label that needs to be printed as below
The "HtmlText2_1" object the HTML text is set leveraging the below HTML code to create a AS-128 Single line of barcode and the value is driven based on the selection of the field OrderID which is a user input
"<head><title>Code-128 Barcode Generate</title><style>
#barcode {
font-size: 0;
line-height: 0;
white-space: nowrap;
margin: 10px;
border: 1px solid black;
padding: 5px;
display: inline-block;
}
#barcode::before {
display: inline-block;
height: 100%;
vertical-align: middle;
}
#barcode img {
display: inline-block;
vertical-align: middle;
}</style></head><body><div id='barcode'><img src='https://barcode.tec-it.com/barcode.ashx?data="&OrderID.SelectedText.Value&"&type=Code128&dpi=96'/></div></body>"
- On the print function, we would update the base record to change the status to "02" using a patch function
Patch(GeoMap,LookUp(GeoMap,'Consignment ID'= OrderID.SelectedText.Result),{Status:{ Value: "02"}})
Barcodes play a critical role in delivery and parcel management systems, enabling real-time tracking, sorting, routing, and inventory management. They help to improve the efficiency and accuracy of the delivery process, which benefits both businesses and customers.