Change QuoteWerks Document Number Prefix on a Layout

To change the QuoteWerks document number prefix on a Layout requires the ‘last’ formula to extract the actual number part of the reference.

The ‘last’ formula takes two parameters:

  • string – the piece of text that we want to take part of
  • num – the number of characters that we want to take from string

So how many characters do we want to take? By default, QuoteWerks document numbering starts at 1000, so that’s 4 characters that we would need. But what happens when we get to 9999? When we hit 10000, we’ll need 5 characters.

We know that the prefix will always be 3 characters (or 4 characters on remote installations), plus the 1 character for the “Q”, “O” or “I”, so we need to take the length of our QuoteWerks document number and subtract 4 (or 5 characters for remote installations).

So, we are left with the following formula:

last(documentheaders->docno,(len(documentheaders->docno)-4))

For remote QuoteWerks installation Layouts, use:

last(documentheaders->docno,(len(documentheaders->docno)-5))

A different prefix can be applied by concatenating a different string to the formula:

"NEW"+last(documentheaders->docno,(len(documentheaders->docno)-4))

If you want to keep the “Q”, “O” or “I” document type part of the QuoteWerks document number prefix, then subtract 3 instead of 4:

"NEW"+last(documentheaders->docno,(len(documentheaders->docno)-3))

For more QuoteWerks Layout authoring and formula tip and tricks, please search our blog or contact development@hilltopsit.co.uk

Related Stories

See all

ConnectWise Sell vs QuoteWerks: Aspirational Perception

Jul 15, 2025

🚀 From Practical to Aspirational: Why MSPs See ConnectWise Sell as the Next Step Beyond QuoteWerks In writing, reflecting and drawing conclusions from the previous blog post comparing ConnectWise Sell and QuoteWerks, it got me wondering whether ConnectWise could be perceived as an aspirational move. As a QuoteWerks reseller, it’s natural to feel a sense […]

READ MORE

QuoteWerks Development Path – A Speculative View

Jul 14, 2025

QuoteWerks has long been a staple in the quoting and proposal software space – for IT and managed services providers, plus many, many other product and service provider verticals. Its journey from a classic Windows application to a hybrid web-enabled platform is not just a tale of modernization, it’s a fascinating case study in software […]

READ MORE

The Digital Backbone of Modern Manufacturing: Trends in Backend Software and Workflow Integration

Jul 10, 2025

In 2025, the manufacturing sector – particularly in the UK and USA – is undergoing a profound transformation. While much attention is given to robotics, AI, and smart factories on the production floor, an equally important revolution is happening behind the scenes: the modernization of backend business software. From quoting and CRM to invoicing and […]

READ MORE