Date Range within a script
I created a script that creates a date range based on todays date and a calculation on today's date.
I am using the set field function to populate the fields as follows:
Insert Current Date(Select, Current_date)
Set Field (Global Start Date = Current date + 1)
Set Filed (Global End Date = Current date + 45)
Set Field (Date_Embark; Global_Start_Date & "..."& Global_End_Date)
This final command sets the field to 1/17/2015...3/3/2015, which looks correct, but the system doesn't seem to see this as a date range and returns the response "No records match this find criteria" There should be many records that match and when I input that same date range into the field, without using the script, it returns the correct records.
I'd appreciate any ideas on this.
You cannot modify the value of global fields while in find mode. Modify them in Browse mode, THEN enter find mode and user their values to set values in non global fields for performing your find.
See these scripted find examples: Scripted Find Examples