Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi

I have a database that I use at work and one of the tasks I have to do is print out a list of jobs required for the day as well as a option to select yesterdays list or tomorrows. I would like to set up a script that will do this for me.

Is this possible and if so how do I go about this?

Regards

Peter

Posted

What you need to do is a find for reports due on a specific date. A script to do this for reports due today would be:

Enter Find Mode []

Set Field[DueDate,Status(CurrentDate)]

Perform Find []

To find reports due yesterday or tomorrow, modify the Set Field step to be Status (CurrentDate) -1 or +1

You might want to think about what will happen on a Monday or Friday. For example, if today is a Friday, you might want to find reports due on Status(CurrentDate)+1, +2 and +3 to cover all the way through to Monday as the next working day. Similarly for today being a Monday, as -1, -2 and -3. This will ensure you allow for weekends.

So, to cover all this for a script to find reports due on the NEXT day, plus some error checks etc and possibly coming in to work on Saturday and checking, the script would be:

Set Error Capture [On]

Enter Find Mode []

Set Field[DueDate,Status(CurrentDate)+1]

If[Day(Status(CurrentDate))=6]

. New Record/Request

. Set Field[DueDate,Status(CurrentDate)+2]

. New Record/Request

. Set Field[DueDate,Status(CurrentDate)+3]

End If

If[Day(Status(CurrentDate))=7]

. New Record/Request

. Set Field[DueDate,Status(CurrentDate)+2]

End If

Perform Find []

If [status(CurrentFoundCount) = 0]

. Show Message ["There are no reports due tomorrow, or on the next working day"][OK]

. Show All Records

. Exit Script

End If

Go To Layout [a list type layout of reports due]

Sort [however you want your reports sorted]

Posted

Thanks for replying.

Im new to this scripting and Im having a few problems. Am I to copy your example exacly as you have wrote it. ie: Set Field[DueDate,Status(CurrentDate)+1] because if I am I can not find the function for [DueDate,Status(CurrentDate). Sorry for being a pain.

Peter

This topic is 7960 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
×
×
  • Create New...

Important Information

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