AnsweredAssumed Answered

Trouble with date searches

Question asked by mpeay on Jun 6, 2018
Latest reply on Jun 7, 2018 by mpeay

I'm trying to set two types of date searches in a log book type layout.  I've gotten the scripts from community sources that seems to work for the OPs but neither seems to work for me in FM pro 16.  Both are associated with a specifically named search layout. The first is a search intended to find records from day A to day B, with input fields for a start date, end date, and search button.  This works except it always shows an additional day (05 June).

The second is intended to be a button that only shows records from "today".  This is to minimize clutter so the officer won't have to see the other hundreds of entries from previous days. I've shown the scripts below.  When i execute the Today script it takes me strait to a blank find view even though there are dozens of records for today.  Thanks for input.


Date range find:

set variable [$Date; value: Search::search date range]

perform find [restore]



go to layout ["logbook (logbook); Animation: None]

enter find mode

set field [logbook::timestamp [get ( currentdate )]

set error capture [on]

if [not get  ( lasterror )]

end if