Skip to main content
Question

Auto Number based on Value from another table

  • March 21, 2023
  • 0 replies
  • 59 views

Forum|alt.badge.img+4

I have a Projects Table and a Work Order Table.  One project has many Work Orders.  I want my work order numbers to be based on the Project ID field from the projects table.  

For example, if my project number is 12345, then I want my work orders to be 12345-A or 12345-B.

I know there has to be a way to do this, but I can't figure out the formula.    TIA



------------------------------
Allison Watson
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

The issue here is how to rank by Record ID#.  There is a great video here by The Quickbase Junkie. https://www.youtube.com/watch?v=sHU8pB38N2Y

Not tested but the Formula Query (a numeric formula field) to rank by Record ID# would be

var text Query = 
  "{3.LTE." & ToText([Record ID#]) & "}"

Size(GetRecords($Query))

That should return a count starting at 1 to sequence the work orders. You could use that as a suffix instead of A B or C or else you would have to use a formula to translate from the ranking number to the A B C letter of the alphabet.  



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------