AnsweredAssumed Answered

Show the date of last record

Question asked by muhammad.ikram@contedia.com on Oct 17, 2017
Latest reply on Oct 18, 2017 by beverly

Hello Community,

 

I have customers and site reports tables. Engineer visit customer and do a site report.

 

On the customers layout, I would like to show the last site report visit date. There is a creation date field in my site report table. I would like to show the last site report on customer layout.

 

When I select different customer or go to next customer, the site report date should effictively change and refelect to selected customer.

 

I created "LastVsit" calculation field in my site reports table and wrote this calculation. But it says '?' on layout.

ExecuteSQL (

"SELECT CreationDate

FROM CustomerHome_SiteReport_CustomerID

WHERE complete = 1

Order BY CreationDate Desc

FETCH FIRST 1 ROWS ONLY

"

; "" ; "" )

 

My question is what would be best way to display the last site report date on customer layout.

 

Thanks

Outcomes