APSF //- Put the last observed date for each object in a specified user field. //- Date is in form YYYY-MM-DD for ease of sorting. //- Assumes global observations are being used. //- //- Paul Rodman, March 2008 //- //- V1.0 12 Mar 2008 //- Initial release. // Change the constant below to 1, 2, 3 or 4 to specify what user field to use const userFieldToUse = 1 dim i,j,n as integer, ob as APPlanObject, gob as APObservation, lastDate as double UserHeading(userFieldToUse)="Last Obs Date" for i=1 to nObj ob=Obj(i) n=ob.nGlobalObservations if n<=0 then ob.User(userFieldToUse)="" else lastDate=0.0 for j=1 to n gob=ob.GlobalObservation(j) if gob.DateTime>lastDate then lastDate=gob.DateTime next ob.User(userFieldToUse)=format(YearOfDate(lastDate),"0000")+"-"+ _ format(MonthOfDate(lastDate),"00")+"-"+ _ format(DayOfDate(lastDate),"00") end if next bleep