0

follow up on previous question and problem with equation

let LastDate := max('Rope Inspection Record'.'Inspection Date');
select 'Rope Inspection Record'.Result where 'Rope Inspection Record'.'Inspection Date' = LastDate

 

I am getting "End Expected: where at line 2, column 44" error code

am I using this properly?

6 replies

null
    • Pete.1
    • 3 yrs ago
    • Reported - view

    I am trying to selet the result from an inspection (sub table) based on the most recent inspection date from the same sub table

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    let LastDate := max('Rope Inspection Record'.'Inspection Date');
    first((select 'Rope Inspection Record' where 'Inspection Date' = LastDate).Result)

     

    It's possible you don't need the first() in the code....

    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    Or maybe simply :

    last('Rope Inspection Report' order by 'Inspection Date').Result

    • Pete.1
    • 3 yrs ago
    • Reported - view

    Alain that works perfectly......Thank you

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    Indeed, the previous post combined with this one gives Alains' result... thanks Alain.

    • Simon.1
    • 3 yrs ago
    • Reported - view

    Thanks Alain - I was completely unaware of "order by"!

Content aside

  • 3 yrs agoLast active
  • 6Replies
  • 423Views