Forum Discussion

Mastec's avatar
Mastec
Qrew Member
9 months ago

Adding Line items numbers to a record....read on.

I have an existing list of line items in a table. Thru a pipeline these lines items are bulk added to a Parent table Order header record. Is there a way to assign a unique line item #'s to each order's line item, starting with line item # 1. (so can't just show record id for each line item). The catch here is that that the user may add a line item individually (not in batch with the pipeline) to the order and that added item must equal the last line item # plus 1.



------------------------------
Cloudbase Services
------------------------------

4 Replies

  • Try this as a Formula Query for sequential Line numbering

    var text QUERY = "{20.EX.'" & [Related Job] & "'} AND {3.LTE.'" & [Record ID#] & "'}";

    Size(
    GetFieldValues(
    GetRecords($QUERY),3))



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • GeorgeBramhall2's avatar
      GeorgeBramhall2
      Qrew Cadet

      Of course...a query formula. Thanks Mark!!



      ------------------------------
      George Bramhall
      ------------------------------
      • GeorgeBramhall2's avatar
        GeorgeBramhall2
        Qrew Cadet

        I just noticed that if I add a line item to the PO that may have a Record ID that is not greater than the last item that the added item is not added as the last item # but rather gets inserted in order of the record ID's shifting all other line items down one. Is there any way for these occassions where a line item is added after the fact that the new line item is now = to last item number plus one leaving all othe other line items at the same line item #?



        ------------------------------
        George Bramhall
        ------------------------------