I think you need three period characters, not two. See if "..." works for you.
Thank you Mike... I have tried two and three periods... the book says you can use either but I appreciate your input.
Try changing your Set Field step to Insert Calculated Result.
Steve could be on to something, but it may depend upon which version that Richard is using?
I don't have problem with Set Field in FM11 or FM12 when using date range. And perhaps it's the fields in the dialog box? Are they date type? are they globals?
I think Insert Calculated Result requires the field to be on the layout, so I like Set Field instead.
But I have had problems with using a date range directly in the Set Field step before. Since it is scripted, I use a variable instead - set the variable $range with the date range, and then use the variable as the find criteria. That way, I have not had any problems.
GetAsText ( Start Date Field ) & "..." & GetAsText ( End Date Field )
I hope the below one will help u. Check whether the Date field is Global?
Your Table name is ZOO. (in your Layout)
In table ZOO you can use this below 2 fields.
Start_Date - type is Date - Double click the field and Choose as Global in Storage Tab
End_Date - type is Date - Double click the field and Choose as Global in Storage Tab
This below script can be helpful. Becoz Surely your date will be between this '2000 Jan to Current date'. . Write this below 2 steps script in button click. Default your start date set to 1.1.2000. When you want you can change by field input. This 2 lines are enough I think in the script.
Set Field[ZOO::Start_Date; Date( 1 ; 1 ; 2000 )]
Set Field[ZOO::End_Date; Get( CurrentDate )]
In the Portal (For ex, ANIMALS_for_ZOO is the Portal name), you need to have the common Date field (in Table ANIMALS) to show you which date the records getting saved. For example, Here we can Say the field name 'Date'.
Date - type is Date - Double click the field and Choose as Indexed in Storage Tab - And also in the Auto Enter tab, Select the Checkbox, Creation and select in the dropdown as Date.
In the Relationship side, (ZOO & ANIMALS_for_ZOO)
Make sure you make relation between the two tables (ZOO & ANIMALS_for_ZOO) have the below condition when you make relationship
1. Make relationship between two table's Primary key.
For ex, ZOO_ID from table ZOO
and ZOO_ID from table ANIMALS_for_ZOO.
2. Make the relationship by
add, Start_Date from table ZOO ≤ Date from ANIMALS_for_ZOO table
and also add, Start_Date from table ZOO ≥ Date from ANIMALS_for_ZOO table
I mean it below,
Start_Date ≤ Date
Start_Date ≥ Date
Then go to Browse mode, and check. I hope it will help you.
Richard may have been found out,
Enter Find Mode
At that point you no longer have access to the data in the record because you are no longer in the record.
You should set variables with your field values and then use them in the calculation.
Set Variable ($start_date ; "start_date")
Set Variable ($end_date ; "end_date")
Enter Find mode
Set Field ("Date" ; $start_date & "…" & $end_date
Note: that is not three periods. Its the ellipses character. On a Mac use "option-;".
FMP will use either the ellipses or two/thee periods but you might save a couple of keystrokes by entering it yourself.
Thank you so much for your reply and question "Is it global?". you definitely pointed me into the correct and easiest solution (two minor changes to the program).
I changed the two fields in the Show Custom Dialog script step to GLOBAL and IT WORKS! I have uploaded a short video showing the problem and the solution at www.youtube.com/embed/j50yxb8bu5s
Thanks for the reply... I found a very straighforward solution by trying Beverly's suggestion. I made a short video and put it on YouTube if you are interested in finding by date ranges in scripts.
Thank you alagu for your very detailed and thoughtful reply to my dilemma. I started at the top to try each solution and Beverly asked about Global and it triggered me to try something and it worked with only two minor changes to the program. I wrote a very short program and made a video on YouTube if you are interested in the solution. I put the link on Beverly's suggestion reply. Thanks again.
Love your name... thanks for the response (IR12). I believe what you suggested is equal to what I actually did that worked. I replied to Beverly (above) and put a video on YouTube that shows the solutions. I very much appreciate the effort you put into giving a very clear and concise solution.
You do NOT need to set the variable first. Neither do you need to Show All Records before beginning a find.
Dates accept date strings just fine in all versions (since 7 I think) whether you use two or three periods*. Set Field is indeed the step to use. It is a shame that misinformation spreads so easily, particularly coming from a Developer's forum.
* An exception is if you are searching for decimal numbers ... you will need to use three.