<i><font color="#663300">Hi Bhavbhuti,
<i><font color="#663300">Is it possible/advisable to keep the CBNewID() in the Table and not in the view</font></i>
That is how Codebook was designed.
<i><font color="#663300">and if so how do I show the next no. in the form and yet provide for the user clicking Revert and the next no. not being wasted.</font></i>
There is nothing in Codebook to prevent the id number from being wasted. With 2147000000 numbers (or more if you are using base62 generated character ids) it has never been a problem for me. If you have a strong need to conserve numbers, you could always have a routine in your escape method that puts the unused number back in the id table.
</font></i>
Hi Pamela
This is where sequence is required not UniqueIDs.
Could we have a CBNewID() with an extra parameter that just returns the current value assignable not necessary given. Just a simple lookup and return the value on a call like CBNewID(.F., .T.) or CBNewID("PONO", .T.). The second para say just lookup and thats all.
When the BO does the actual save only then the real CBNewID() is assigned, we could have checks for the retunred value being the same as the originally retuned if so warn the user and override with the new value. Regards Bhavbhuti ©2001 Bhavbhuti Nathwani |