0

Go to last record

in code: I have a button in a table who create a record in another table and link correctly but it always display the first record. How to go to the last record of a table.

3 replies

null
    • Choices_Software_Dean
    • 3 yrs ago
    • Reported - view

    let n := cnt((select TableName).FieldName);
    openRecord(record(TableName,n))

    • Choices_Software_Dean
    • 3 yrs ago
    • Reported - view

    I just noticed that the above code fails if any record in the FieldName column has no value. Someone else can probably come up with a better sample.

    • Cegep de jonquiere
    • James_Deraps.1
    • 3 yrs ago
    • Reported - view

    Dean I found the solution

    openTable("Facture", "Saisie");
    let i := (create Facture);
    let currRec := Id;
    i.(Contact := currRec);
    openRecord(record(Facture,number(i)))

Content aside

  • 3 yrs agoLast active
  • 3Replies
  • 908Views
  • 1 Following