nexgen Posted February 7, 2017 Share Posted February 7, 2017 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 More sharing options...
comment Posted February 7, 2017 Share Posted February 7, 2017 1 hour ago, nexgen said: I need to add one record for every month. What would be the purpose of that? Do you have anything to record about each month? Something we don't know already? Link to comment Share on other sites More sharing options...
nexgen Posted February 7, 2017 Author Share Posted February 7, 2017 I need to enter monthly data like: end of the month inventory value etc... I have many datas which needs to be entered once a month only and I used to enter those datas as Dec 2016, Jan 2017 etc... Link to comment Share on other sites More sharing options...
comment Posted February 7, 2017 Share Posted February 7, 2017 (edited) 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 February 7, 2017 by comment 1 Link to comment Share on other sites More sharing options...
nexgen Posted February 7, 2017 Author Share Posted February 7, 2017 Thanks for suggestion. Regarding value list, I want to populate it from Jan 2016 to current month. Any suggestion for that? Link to comment Share on other sites More sharing options...
comment Posted February 7, 2017 Share Posted February 7, 2017 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 More sharing options...
nexgen Posted February 7, 2017 Author Share Posted February 7, 2017 So any suggestion that user is presented with such months option but the data is stored as date? Link to comment Share on other sites More sharing options...
comment Posted February 7, 2017 Share Posted February 7, 2017 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. 1 Link to comment Share on other sites More sharing options...
nexgen Posted February 7, 2017 Author Share Posted February 7, 2017 That's a good solution I think. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now