If you enter same different data into same field you will only have last data entered in search field. Instead use
Company::g_dateOne & "..." & Company::g_dateTwo
and you will get your search result
... means in between. Can be used for date and number if you like to search a intervall
date... means everything from date and above
date1...date2 means everything from date1 to date 2
Thanks, that explains how to get the range. The more fundamental problem is that I've getting an 'invalid value' error even when I remove >/ < components. Since all 3 fields are 'date' I'm puzzled as to why.
You do not use </> in FileMaker. In your layout, go to Search Mode and then lock at Operator and you will se all possible operators
Sorry, I was using unclear shorthand. I'd meant I'd removed the "≥" of
"≥" & IO::oc_Date_start etc.
So setting the Date_prescription field to
& "..." &
is still an 'invalid value'.
You get an error because of "Set Field".
After Enter find Mode, use "Insert calculated result" instead of "Set Field":
Insert Calculated Result [ IO::Date_prescription; IO::oc_Date_start & "..." & IO::oc_Date_end ]
You do not need to user Insert calculated result if you enter information correctly. That was way back in older versions of FileMaker
If you use Set field and then when you enter information to search for you just
Choose field oc_Date_Start from fields to the left
enter & "..." &
Choose field oc_Date_end from fields to the left
That should work
AFAIK, OP did not specify the FM version he's using.
Why teach new beginners old technique? Better they learn new technique for current version
I'm using FM Advanced 14....and a little confused. What changes were you suggesting to this:
Go to Layout [ “Outcome_summary” (IO) ]
Enter Find Mode [ ]
Set Field [ IO::Date_prescription; IO::Date_prescription; IO::oc_Date_start & "..." & IO::oc_Date_end ]
Perform Find [ ]
Set Error Capture [ On ]
I didn't get how: Choose field oc_Date_Start from fields to the left enter & "..." & Choose field oc_Date_end from fields to the left
goes into the script?
In Find mode, the values of fields are not available unless they're global fields. If oc_Date_start / oc_Date_end are normal date fields, you'll need to set them in variables before entering Find mode, like this:
Set Variable [ $start ; Value: IO::oc_Date_start ]
Set Variable [ $end ; Value: IO::oc_Date_end ]
Enter Find Mode [ ]
Set Field [ IO::Date_Prescription ; $start & "..." & $end ]
Set Error Capture [ On ] \\ The Error Capture should be set before you perform the Find.
Useful to know for future, but as mentioned, they're both global. So I remain puzzled by the error.
Try attaching an example file please.