Jump to content

Help newbie please. Search & sort 7 days script


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

Recommended Posts

  • Newbies

I wish to create a script that will sort and display (view) next seven days ,(including today), from a Job Scheduler database I have created. I just do not know enough about formula & calculations. I use a date field in the database and I already use that to view current and today views. Just need the next seven day view and I do not need to be as complicated as a week view but it would be nice.

Link to comment
Share on other sites

  • 3 weeks later...

I did a calendar database that used a function like this. basically you need to...

Give each "event" a number based on their day of year (use the DayofYear function) it will be 1 to 366.

To generate the weekly display for today, do a find for events that match "DayofYear(Today) to (DayofYear(Today+7)"

Display the resulting records appropriately.

Problems you need to work around:

Near the end of the year (Today+7) will make a number bigger than 366. Make a function that sorts this out.

There might not be any events found for the week, so the find will be empty or less than 7 records. I got around this by making a database with 366 records, and elating it to the actual events database. hat way the search always finds seven records, some of them will not display any related events.

Link to comment
Share on other sites

This topic is 7661 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.