Jump to content
Sign in to follow this  
sin

date value list

Recommended Posts

hello I'm new to filemaker pro and I need some help

with my database. I was wondering if it is possible

to create a value list than contains the current date as well as a few of the dates after it. If it is possible I would appreciate anyone showing me how to do it. :)

Share this post


Link to post
Share on other sites

You can create a repeating calc with the number of repetitions being however many days you want.

Get ( CurrentDate ) -1 + Get ( CalculationRepetitionNumber )

With it being 5 repetitions, you will today's date plus the next 4 days. You can then create a value list based off this field.

Share this post


Link to post
Share on other sites

While the right idea, if you make that calculation stored then it won't update, if unstored, then it can't be used as a valuelist.

I suggest adding a StartDate field, then the repetition calc becomes:

Extend(StartDate) - 1 + Get(CalculationRepetitionNumber)

Now you can change the StartDate via a script, and the valuelist will recompute.

Here's a sample file to show you a possible setup. I've added a script to demonstrate switching the current date to today. Check the valuelist (set to 2/2/2002 now), then run the script to move the valuelist to today.

You could run that script as a startup script when the file was launched, or via other scripts you have.

RecentDates.fp7.zip

Share this post


Link to post
Share on other sites

thnx for the help guys, it works perfectly

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    MartieH 
×

Important Information

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