Line Numbering for Quotes and Workorders (using Tags)

<< Click to Display Table of Contents >>

Navigation:  Misc Application Notes >

Line Numbering for Quotes and Workorders (using Tags)

A global setting has been added allowing the Tag field on workorder items to be used as persistent line numbers in both quotes and workorders (jobs).  These line numbers can be referenced in external software and generally do not change.

 

Persistence of the numbers

The line numbers are persistent, meaning that once a number is assigned to a line item within a workorder or quote, that number cannot be reused on other lines.

For example, if a saved workorder contains 5 lines numbered 1,2,3,4,5, and the third line is deleted; the remaining four lines will be numbered (still) 1,2,4,5.  Further if another new line is added it will be added as line 6, thus the lines will then be 1,2,4,5,6.

 

 

 

Some lines may have a quantity required of zero, this frequently happens when new part revisions are created; these lines are given a Tag of -9999 (or in some case negative of what they were previously, so if quantity is set they can recover the their original line number), which is a flag to say its not an "active"

 

Renumbering Line Numbers

 

There is an option to renumber the line items as displayed.  You will be prompted at the end as to whether to preserver the original next number or to reset it.

 

Using Tag Line Numbers in Reports

Use database labels linked to tblWorkorderItem.tag, eg in this example the tag has been given the username DBtag

report_tag1

 

 

Add conditional formatting to hide the DBTag if its <=0, or to skip the records altogether- this is optional as we can filter out the unwanted tag values earlier (especially for customer facing reports such as dispatch dockets etc)

 

eg this code for our DBTag's OnGetText event will only display if the tag is greater than 0 (enter this via the Calc tab of the report editor):

procedure DBTagOnGetText(var Text: String);

begin

  if   tblWorkorderItem['Tag']>=0 then

    Text :=   tblWorkorderItem['Tag']

  else

    Text :=   '';

end;

report_tag2

 

Ideally on customer facing reports, we should filter out the negative tag numbers (or filter by qty required<=0), and also sort by tag eg:

report_tag3 report_tag4