As Erika stated, we are going to put an option in reconcile to either reset or retain reconciled values. The problem (looking into the future) with this approach is that it will still only cover a portion of what people are trying to do at any given moment. Today we have users who always want to reset all their Global Values, and we have users that always want to retain all their Global Values. But as designs progress, we will have more and more users that will wish to retain some, reset others, delete and recreate still more.
The two current "camps" depend on whether your way of working is driven by the .db/.dat file or the .dsr/.ddt combination. Some people keep the .db/.dat files - not the .dsr/.ddt and always regenerate .dsr/.ddt before making design changes. Others do the reverse. There are a number of designs that use the GlobalValues as a kind of ongoing lookup. Others *need* to have them reset as part of a design change. I have an application that uses the GlobalValues as derived from the Zip Code database, replacing it completely. The number of variations of use is endless. For those that are using Global Values simply as a @number replacement, and the numbers generated are contininous and ongoing, then yes - it is necessary to derive those numbers from the running .db file. A simple one record mass update will do the trick before a reconcile.
In the long run, it comes down to how much control you want. The way it works now, the value of a Global Value is applied at design time by the designer of the application. If it were always derived from the .db at reconcile it would always be decided by the actions of end user (appropriate in the @number case (given there have no mistakes on their part), but not many others), if it were a single setting: "retain Global Values" at reconcile, then the question would be: "which Global Values" because some might be altered or reset at design time, and runtime Global Values would begin to inappropriately accumulate. The complaint would become that there is no way to reset the value, as opposed to it being "cumbersome" to retain the value. Additionally, if we offer to let you set/reset them one by one at design time, we certainly limit the extremely useful option of having many thousands of them, in that it would be extremely cumbersome to have reset or retain them individually were there more than a few. They would have to be "classed" upon creation: some being reset at redeploy, others being retained at redeploy. Or, by some means, queried and grouped.
Looking a few steps further down the road, the most flexible solution is to provide yourself with a simple mass update that derives any ongoing Global Values from the fields driven thereby, and use that mass update either before a reconcile, or after, depending on requirement. That way you have a flexible means, that adapts to the design addition of a further Global Values, that can selectively reset or retain values, that is far less cumbersome than a (possibly) lengthy dialog box with at a bare minimum of one button and one text box per GV.
By being a mass update, it can easily be checked for correctness and completeness, can easily be undone, should there be a mistake, can be printed, retained, edited in a text editor, and supplied to end customers, without sacrificing design control. And, given, that these would not change with every design change, this program only need be written once, checked for correctness once, as opposed to redecided every time a reconcile is invoked.
So while this solution does require that the application programmer have some programing skills, these must already be present for Global Value use in the first place. A less flexible, but more structured solution is to use "data driven" programming. That would mean checking the Global Value before use for a "reset value" that indicates that the Global Value needs to be rederived before use (if appropriate). That approach (in general) guarantees correctness. It does mean that you have to have the discipline when writing code to check for initialization before use. But given that we (Lantica developers) cannot tell if your application falls in the "reset camp" or the "retain camp" or in the ever-growing "mix-n-match camp", such an approach is probably worth the additional effort to adopt. It will make your application easier to maintain, more flexible, and more deployable.
Afterall, there are many uses for Global Values:
1. A retained value that can be altered at runtime 2. A communications channel across users and across time 3. A logging mechanism 4. A unique number generator 5. A field supplement 6. A static/dynamic lookup table 7. A simple lingual translator 8. A generational marker or tag 9. A copy control mechanism 10. A secondary security scheme 11. A replacement for "hard coded" values in SBasic 12. A multilayer undo 13. Result set retention 14. Legal shell command contents (offer choices, but *all* choices)
etc....
Some of these wouild benefit from a reset, others would want to be retained. Some are so dynamic it hardly matters.
|