mentairia Posted August 6, 2005 Posted August 6, 2005 I want to be able to set the start month in a field on the page. From that start month I want it to dynamicly fill out 12 fields with all the months from the start month. I have included a file to look at is much more descriptive and easier to understand.
SlimJim Posted August 6, 2005 Posted August 6, 2005 I had some problems downloading your file and I ended up with a file with the wrong extension .htm instead of .fp7 However, there seems to be no corruption. I am uploading a changed file with a possible solution for you. In order for this to work the Months have to be spelled consistently so I have put them into a Value list which you should use for data entry. This also has the advantage that you can change the language by simply changing the value list. The method requires two extra fields. One containing the value list in standard order as a reference and the other with the months in the order that you want them. When you see how this is done you will understand the need for consistent spelling. send_it.zip
CobaltSky Posted August 6, 2005 Posted August 6, 2005 Hello mentairia, There are many different ways to do what you have described and you have given us very little information with which to suggest which would be the best method. I have taken a wild stab and am attaching a modified copy of your file which shows one possible method.
CobaltSky Posted August 6, 2005 Posted August 6, 2005 Hi SlimJim, You beat me to it by a whisker. However I note that the methods we used are not the same, which illustrates the point I was making about there being many ways to sskin this cat. ;)
SlimJim Posted August 6, 2005 Posted August 6, 2005 I'd be interested to see your method but I don't see the attachment.
mentairia Posted August 7, 2005 Author Posted August 7, 2005 I am an idiot and forgot about the next step of this calculation. I need the months to know what year it is as well so it knows when we go from dec to january it is a new year. I like what you did Slim and I understand exactly what you did. But without it knowing the year has changed will not send the history to the correct place. Thanks Again for your Help! Tony D.
SlimJim Posted August 7, 2005 Posted August 7, 2005 (edited) Are we starting off in the current year or do you intend to have a field containing the year number? The following changes will produce the Year alongside the month: Add a new number field Year; you can set it up to calculate the current year Year(Get(Current Date)) or you can simply allow it to be entered as a 4-digit year. Then change the definition of Months to Substitute(Right(MonthList;Length(MonthList) - Position(MonthList;Start Month;0;1) + 1);"¶";" " & Year & "¶") & Substitute( Left(MonthList;Position(MonthList;Start Month;0;1) - 1);"¶";" " & Year + 1 & "¶") Basically this replaces the carriage return at the end of each value by a space the year number and a carriage return. All the other calculations stay the same but the year will be appended at the end of each global Month1,... field. Edited August 7, 2005 by Guest
mentairia Posted August 8, 2005 Author Posted August 8, 2005 Cannot get year working all else is rocking Just as it should. So could you show me it working So I can backward engineer to see what I am doing wrong. Thanks Tony D
SlimJim Posted August 8, 2005 Posted August 8, 2005 OK attached. I have set the Year field up as Auto-Enter the current year but that is largely irrelevant as it is a global. Put a 4-digit year in and away you go. Try the effect of other entry formats and you will see why 4-digit is best ;) send_it.zip
mentairia Posted August 8, 2005 Author Posted August 8, 2005 Slim You the Bomb! Thanks I understand 100% now
Recommended Posts
This topic is 7050 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