Jay, Try using "Insert Calculated Result" directly into the field in Find mode with your script:
Insert Calculated Result [ date ; ">" & date ( month ( get ( currentDate ) ) ; day ( get ( currentdate ) ) ; year ( get ( currentdate ) ) - 1 ) Rob On 12/29/08, Jay Erlebacher <[email protected]> wrote: > Turns out that the global comes out as a number, not a date, ie > > 733039. > To get the global text string into a format > 12/29/2007, I had to do > the calculation > ">" & DateToText (Status (CurrentDate) - 365) > But when I copy the global result ">12/29/2007" into the date field, > it inexplicably pastes the following into the field > (Status(CurrentDate) - 365) > Any clues? > Thanks > Jay > > On Dec 28, 2008, at 9:14 PM, Martina Dillon wrote: > >> With FM6, you will need to set a global text field to your >> calculation (">" >> & Today-365"). (I would suggest using Status(CurrentDate) instead of >> Today) >> Then use the copy step (select the global field) and paste step >> (Select the >> Date field) into your Date field. You have to be on a layout with >> the copy >> & paste fields present for the copy paste to work. >> >> So your script would look something like this- >> >> Go to layout "all fields" (this is a layout with all of your fields- >> or the >> ones you need for this script) >> Set Field ["global", ">"& (StatusCurrentDate-365)] >> Copy [Select, global] >> Paste [Select, Date] >> Perform Find [Replace Found Set] >> Go to layout original >> >> Hope this helps, >> >> >> Martina >> >> >> >>> Enter Find Mode[] >>> Set Field ["Date",( "">" & Today-365")] >>> Perform Find [Replace Found Set] >> >> >>> Can someone help with this seemingly trivial problem? >>> This is maddening. >>> >>> I can do a manual date find like >12/29/2007 with no problem. >>> But when I script a find like this: >>> Enter Find Mode[] >>> Set Field ["Date",( "">" & Today-365")] >>> Perform Find [Replace Found Set] >>> The ">" doesn't show up. Only the year ago date goes into the find. >>> >>> This seems like something very elementary, just finding a range of >>> dates. >>> What the heck am I missing? >>> >>> Jay >
