0

Count subtable

Hello, I have a table Projects which has a subtable Missions.

Upon creation of a new mission for a specific project, I want to get the count of all the already existing missions for that project.

This does not work :

let projet := Projets.ID;
'N°' := cnt((select Missions)[ID = projet]) + 1

 

Ca you help ?

Thanks

1 reply

null
    • Nick
    • 5 yrs ago
    • Reported - view

    This code comes from Ninox Invoices template (restarts invoice line items for every invoice). 

    let myID := number(Id);
    let myProject := Project;
    if Project then
    cnt((select Missions)[Project = myProject and number(Id) <= myID])
    else
    0
    end

Content aside

  • 5 yrs agoLast active
  • 1Replies
  • 1568Views