Barcode.UPCChecksum
-------------------

Calculates checksum for UPC barcodes.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Barcode](component_Barcode.md) | [3.5](newinversion35.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Barcode.UPCChecksum"; Text ) 

**MBS**( **"Barcode.UPCChecksum";** /\* Calculates checksum for UPC barcodes. \*/  
**$Text**) /\* The text with the numbers for the barcode.  
Do use text and not number, where starting zeros would be skipped.e.g. "12345" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Text | The text with the numbers for the barcode.   Do use text and not number, where starting zeros would be skipped. | "12345" |

### Result

The checksum as text.

### Description

Calculates checksum for UPC barcodes.  
### Examples

Calculates a checksum:

 MBS ( "Barcode.UPCChecksum"; "12345" )  
Calculates 7 for the EAN 5901234123457:

 MBS ( "Barcode.UPCChecksum"; "590123412345" )  
### See also

- [Barcode.EANChecksum](BarcodeEANChecksum.md)
- [Barcode.ISBNChecksum](BarcodeISBNChecksum.md)

### Release notes

- **Version 9.4**
    - Changed [Barcode.EANChecksum](http://www.mbsplugins.eu/BarcodeEANChecksum.shtml), [Barcode.ISBNChecksum](http://www.mbsplugins.eu/BarcodeISBNChecksum.shtml) and [Barcode.UPCChecksum](http://www.mbsplugins.eu/BarcodeUPCChecksum.shtml) to only use digits and ignore spaces or dashes in input.

### Example Databases

- [Barcode/DynaPDF Barcode](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Barcode/DynaPDF%20Barcode.shtml#12910FieldAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 9.4pr5](https://www.mbsplugins.de/archive/2019-09-05/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 3.5pr9](https://www.mbsplugins.de/archive/2013-11-29/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 18th August 2014 , last changed 5th September 2019

  
[Barcode.SetPrimary](BarcodeSetPrimary.md) - [Barcode.Version](BarcodeVersion.md)

[HTML Version](BarcodeUPCChecksum.shtml)