Path: csiph.com!news.redatomik.org!aioe.org!.POSTED!not-for-mail From: Helpful Harry Newsgroups: comp.databases.filemaker Subject: Re: Finding in a Script Using Dates with Wildcards Date: Tue, 11 Apr 2017 13:51:13 +1200 Organization: Aioe.org NNTP Server Lines: 41 Message-ID: <110420171351137299%HelpfulHarry@BusyWorking.com> References: <1n3z5a7.12we6wpxhv9ghN%csampson@inetworld.net> <1n49pv5.1m4u9y3yod6u3N%csampson@inetworld.net> NNTP-Posting-Host: zaqLuowqF+H68THNAbfo5g.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Thoth/1.8.4 (Carbon/OS X) X-Face: vIZzK[X\z-._]-_:U?l@cBtwg<{a>ggn\mH}Vs>38E,#R%7h%U0'=4;1Q=erO %[T#a{YJfGvAbWmE@f_h], Howard Schlossberg wrote: > On 4/10/2017 1:57 PM, Charles H. Sampson wrote: > > > > Go to Layout ("xyz") > > Enter Find Mode [] > > Set Field [xyz::Date; Date (DISummaryMonth, "*", $SummaryYear)] > > Perform Find [] > > > > The result is the error message "No records match this set of find > > requests." > > You are trying to make a date of something with an invalid day. Instead > of trying to insert something you're converting to a date, just insert > the text... as in: > > DISummaryMonth & "/*/" & $SummaryYear Maybe things have improved in the newer versions of FileMaker, but in the older ones I've always found that it complains if you try to simply insert text values into scripted Find Requests. Even in manual Find Requests it doesn't like the wildcards "*" or "?". Instead you have to use a function to convert it to a date format, then back to text, and use the Range operator "...". In fact the older versions of FileMaker don't even like using Set Field in such situations and instead you have to use the Insert Calculated Result function. (This is in FileMaker 5.5 and older, I haven't yet tried in the "newer" FileMaker 7 I recently got.) e.g. something along the lines of Insert Calculated Result [xyz::Date; DateToText(Date(Date(DISummaryMonth, 1, $SummaryYear)) & "..." & DateToText(Date(DISummaryMonth + 1, 1, $SummaryYear) - 1))] Yes, it's weird and over-complicated, but it's the only way it actually works without error messages. Helpful Harry :o)