Find most recent date in related records

Find most recent date in related records

Hi,

I'm slowly learning how to use custom functions to expand our use of Zoho, but am not experienced in this type of script.

I have a Custom Module (eg Items). It has a related Custom Module (eg Visits). Each Visit is a separate record, with a date applied. Multiple Visits apply to each Item. They may not be recorded in date order.

I have a single field in Items, in which I need to record the latest Visit date. 

I have tried simple Deluge functions, and also looked into calculated fields, but I can't find a way to do this.

Any help would be appreciated.

Thanks

Simon