0

count the number of rows in a table

hello, I will need to know the number of lines in a table, would you have an instruction?

or indicate the line number to know the number of devices. 

 

thanks

Alain

6 replies

null
    • Nick
    • 4 yrs ago
    • Reported - view

    If understand you correctly...

     

    Let's assume you have a table Invoice and a subtable 'Invoice Items'.

    In the subtable 'Invoice Items' add a formula field, e.g. Line#, with this code:

    ---

    let myID := number(Id);
    let myInvoice := Invoice;
    if Invoice then
    cnt((select 'Invoice Items')[Invoice = myInvoice and number(Id) <= myID])
    else
    0
    end

    ---

    • Alain.1
    • 4 yrs ago
    • Reported - view

    Thank you for your answer, this code will serve me for another application, in fact I seek to count the number of "Bistouri" (Quantity)  in my table, the code you gave me increments each line created.. knowing that my table is already filled.

    if you have an other idéa..

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    If you just need the record count, you can click any column header and then click the "Count" button. Then look at the bottom of the column to see the count.

    • Alain.1
    • 4 yrs ago
    • Reported - view

    It works 👍🏻  Do you think I can make appear the quantity in a field?

    • Nick
    • 4 yrs ago
    • Reported - view

    Yes, like this:

    sum('Invoice Items'.Quantity)

    • Alain.1
    • 4 yrs ago
    • Reported - view

    That is ok. Thank you very much 👍

    have a nice day..

Content aside

  • 4 yrs agoLast active
  • 6Replies
  • 983Views