Postman collection
Orders Write

pixiSetBoxRangeForPicklist

Sets or changes the box range (first and last box number) assigned to a picklist after validating boxes, overlaps and box capacity.

Assigns the box range BoxNrFrom–BoxNrTo to the picklist Picklist.

The call validates the input in this order and stops at the first failure, returning a row with Status = Error and a Message:

  1. The picklist must exist in PLHeader.
  2. BoxNrFrom must exist as a box in boxes.
  3. BoxNrTo must exist as a box in boxes.
  4. BoxNrTo must not be smaller than BoxNrFrom.
  5. If the setting Picklist_Creation_Allow_BoxRange_OverLap is 0, no box number in the requested range may lie within the box range of any other picklist.
  6. The number of distinct orders on the picklist (via its picklist items and order lines) must not exceed the number of free boxes in the range. A box counts as free if its BOrderNr is NULL or 0.

If all checks pass, the call:

  • deletes all existing box assignments of the picklist from pixi.PicklistBox,
  • writes the new range into PLHeader.PLHfromBox / PLHeader.PLHtoBox,
  • returns one row with the picklist key, the new range and a status text. The text says set if the picklist had no complete range before, otherwise changed.

Notes

  • The delete and update run in a transaction. If the call is already inside an open transaction, a savepoint is used instead and the outer transaction is not committed.
  • On an unexpected SQL error the transaction (or savepoint) is rolled back, a row with Status = Error and the SQL error text is returned, and the error is logged via log.InsertError (definition not attached).
  • Validation queries use NOLOCK, so concurrent changes may not be seen.
  • The overlap check only runs if the setting value equals 0. If the setting is missing (NULL) or has another value, overlapping ranges are allowed. The check relies on the Numbers helper table, so box numbers beyond its range are not checked.
  • Boxes that already hold an order (BOrderNr set) count as unavailable, even if that order belongs to the same picklist.
  • A former check that blocked changes once items of the picklist had been put into boxes was removed for backward compatibility. The range can therefore be changed even after items have been put into boxes; existing pixi.PicklistBox assignments are deleted in any case.
  • The success status text contains the spelling succesfully exactly as produced by the code.

Tables used

PLHeader · Write PicklistBox · Write boxes · Read Numbers · Read PLitem · Read Orderlines · Read Settings · Read
SQL object:
dbo.pipiSetBoxRangeForPicklist
Updated at 2026-10-30