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:


For remote QuoteWerks installation Layouts, use:


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


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:


For more QuoteWerks Layout authoring and formula tip and tricks, please search our blog or contact

Related Stories

See all

Copying the QuoteWerks QuoteValet URL to the Windows clipboard

Jan 31, 2019

The script below provides a way to quickly and easily copy the QuoteValet document URL for the current open document in QuoteWerks to the Windows clipboard. This can then be pasted into an email or other document to send to your customer. To implement the script, we suggest copy/pasting the below code into a text […]


User is already logged into QuoteWerks message

Jun 18, 2015

This is a fairly rare issue when working with newer versions of QuoteWerks, but it can be very frustrating when it does occur! The issue may occur if a User’s system crashed or they switched off their PC without first logging out of QuoteWerks and requires you to manually delete the “.lck” file associated with […]


QuoteWerks F2 lookup and double click does not work

May 19, 2015

This is another reasonable common query that our clients have which is usually due to the particular User’s Preference settings that is logged in on a particular workstation. Furthermore it will usually affect the User on any workstation that they try and if they log in as a.n.other User then QuoteWerks will probably behave as expected. Ref. […]