Jump to content

Script for date range find


Dezza12
 Share

This topic is 6548 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm creating a tickler database of tasks, and I'm having trouble writing a script that will perform a date range find. Basically, I want to push a button in my Contacts db that will then open the tickler database and show me the tasks that are due within the next seven days.

I can't figure out how to script the find for the current date, plus seven days?

Make sense?

Sorry if this is cake.

Dezza

Link to comment
Share on other sites

Enter Find Mode [ ]

Insert Calculated Result [datefield, DateToText(Status(CurrentDate)) & "..." & DateToText(Status(CurrentDate) + 7)]

Perform Find [ ]

If [not Status(CurrentFoundCount)]

Enter Find Mode [ ]

Show Message ["No tasks are due within the next week."]

Show All Records

End If

Link to comment
Share on other sites

Do you want to find all tasks that have a due date within the next seven days, or only those tasks that are due but not yet completed?

If the latter you'll need a "Completed" field as well as a "DueDate" field. For the script below, the Completed field is empty if it's not completed.

Enter Find Mode []

Insert Calculated Result [DueDate, DateToText (Status(CurrentDate)) & "..." & DateToText (Status(CurrentDate) + 7)]

Set Field [Completed, "="]

Perform Find [replace current found set]

Notes: the DueDate field must be on the current layout when the script is run. Also, the option "restore find requests" must not be selected for either the Enter Find Mode or Perform Find steps.

Link to comment
Share on other sites

It is. I have only three layouts, and the the date field is on each one. I began the script by going to a new layout (which the date field was on), but when it didnt work, I deleted the layout and went back to the main page. Same problem.

Dezza

Link to comment
Share on other sites

This topic is 6548 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.