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

How Smart Software is Powering Small Manufacturers: Trends and Tools for 2025

Oct 10, 2025

In today’s fast-moving manufacturing world, it’s not just the machines on the shop floor that are getting smarter – it’s the software behind the scenes too. For managers in micro, small, and medium-sized manufacturing businesses, staying competitive means more than just making great products. It means running a tight ship behind the scenes: quoting quickly, […]

READ MORE

Supercharging QuoteWerks Reporting with Excel & Power BI

Oct 01, 2025

QuoteWerks is a powerful tool for creating quotes, orders, and managing customer interactions, but when it comes to reporting, many users find themselves limited by its out-of-the-box capabilities. At Hilltops IT, we believe your data should work harder for you. That’s why we’ve created a new video that demonstrates how to unlock deeper insights by […]

READ MORE

To AI or not to AI, That is the Question

Sep 29, 2025

When I started to write this article, I hadn’t really anticipated what a ‘can of worms’ it was going to open for me – how far my mind would wander, how may rabbit holes there are to explore, and ultimately how long it was going to turn out! For those of you prospective readers that […]

READ MORE