Discussions

 View Only
  • 1.  Auto Number based on Value from another table

    Posted 03-21-2023 08:36

    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
    ------------------------------


  • 2.  RE: Auto Number based on Value from another table

    Posted 03-22-2023 15:27

    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
    ------------------------------