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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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