Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 15 OCT 2000 08:52:12PM Master Tuiono wrote:

I have a table where the key field has default set to the sequential counter %SK%.

I want to access this value from a program in order to add another record. At the moment, I am doing a select and get the value of @reccount to give me this value.

Is there another way to get this value directly?

regards

master tu'iono


At 15 OCT 2000 09:42PM Bill Titus wrote:

The next sequential key value is stored in field 1 of item %SK% in the dictionary for the data file. %SK% is not automatically incremented outside of window processing. So, you will need to increment the value in your program and save it to %SK%.

Hope it helps.

Bill


At 16 OCT 2000 12:44AM Master Tuiono wrote:

Thank you very much.

I had just check it following your instructions and it works.

Thanks

Master Tu'iono


At 16 OCT 2000 10:03AM Don Miller - C3 Inc. wrote:

I'm sure that you are aware that there are real shortcomings in AREV's %SK% logic in screens, particularly if you need to have no "holes" in your key sequence (numbered checks are a good example). In a heads-down data entry environment it is almost impossible to the the next available key reliably. There are several replacement processes floating around. You might want to search the site for them.

Don Miller

C3 Inc.


At 16 OCT 2000 12:41PM Michael Slack wrote:

We've got our own process of generating new keys. Actually we have two. We have the one that actually generates the key and another that calls it from a Window. We did that so we could take advantage of some of the Window variables and still use the main code from programs and such. We store our key information in a column within the dictionary by the name of %KEY_COUNTER%.

This %KEY_COUNTER% holds the last key generated, any prefix to the key, the total number of digits the key is to have (usally left padded with zeros) and any unused keys. The unused keys is when someone starts a new record but before they save it they quit the record creation process. Since the key hasn't really been used, it stored for later use. The next time someone creates a new record, our process looks to see if there are any unused keys available first. If there is then that is used. If the unused key section is empty then a new key is generated. This helps us keep down the number of gaps within our keys. It doesn't stop them all together but it helps.

Michael Slack


At 17 OCT 2000 12:22AM Master Tuiono wrote:

Thank you for your you kind advice. Actually I was not aware of this and I will keep this in my reference.

thanks

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/fa7d17044bfc5d3b8525697a0004c7d2.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1