Jump to content

Storing data for every month


nexgen

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

Recommended Posts

I need to add one record for every month.

For example, the user will choose from drop down list like:

Nov 2016

Dec 2016

Jan 2017

Feb 2017

(sorted according to month)

How can I achieve this? and what's the best field type to store it?

Link to comment
Share on other sites

I would suggest you enter either:

  • any date in the given month (which you can auto-correct to the first or last day of that month), and display it as MMM YY;

or:

  • the year and the month, in two separate fields.

 

The value list that you asked about is problematic, because it looks like it needs to depend on the current date - but value lists need to be based on stored fields. The workaround is difficult and costly in terms of resources.

 

 

Edited by comment
  • Like 1
Link to comment
Share on other sites

2 hours ago, nexgen said:

Regarding value list, I want to populate it from Jan 2016 to current month.

I don't think that's a good idea, because (1) as I said, basing a value list on an unstored calculation is difficult; and (2) you won't be able to chronologically sort the records in your table using a field that contains a MMM YYYY string.

Link to comment
Share on other sites

The only way you will be able to present the user with a list that adds a value each month is to create all the possible values, from Jan 2016 to Dec 4000 (or some earlier month) in an auxiliary table, and use a  ≤ relationship to show only records before or in the current month.

  • Like 1
Link to comment
Share on other sites

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