zpl.tools
Serialization Commands

^SN - Serialization Data

Advanced serialization control

^SN - Serialization Data

Overview

The ^SN command provides advanced serialization control for creating auto-incrementing numbered fields.

Syntax

^SNv,n,w

Parameters

  • v = Starting value
  • n = Increment/decrement value
    • Positive = increment
    • Negative = decrement
  • w = Add leading zeros
    • Y = Yes, pad with zeros
    • N = No, natural numbers

Description

  • Advanced serialization with more control
  • Supports zero-padding for fixed-width numbers
  • More flexible than ^SF
  • Useful for formatted serial numbers

Usage Notes

  • Typically used with ^FN fields
  • Zero-padding useful for barcodes
  • Applies to following field
  • Useful for variable serial numbers

Example

^XA
^SN100,1,Y
^FO50,50
^ADN
^FN1^FDOrder: ^FS
^XZ

Creates: Order: 100, Order: 101, Order: 102...

Common Uses

  • Zero-padded serial numbers
  • Fixed-format numbering
  • Invoice numbering
  • Barcode numbering
  • ^SF - Serialization Field
  • ^FN - Field Number
  • ^FV - Field Variable

See Also