Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a QVF which has a number of key fields Autonumbered. If I load this qvf into a new app using a binary load then add more data and autonumber a key field will the counter be reset or will it work in conjunction with the binary?
Ex. QVF 1 has an autonumbered field %Key
QVF 2 Script
Binary [lib://QVF\xxxx];
NewData:
Load *,
Autonumber(KeyField,'KeyField') as %Key
From xx;
Thanks!
Mark
The counter will reset. You cannot use the autonumber function to generate unique numbers across reloads. Only use autonumber in the last app so you won't generate duplicate keys in intermediate result qvd's or apps.
The counter will reset. You cannot use the autonumber function to generate unique numbers across reloads. Only use autonumber in the last app so you won't generate duplicate keys in intermediate result qvd's or apps.
Thanks Gysbert, if I were to use either of the autonumberhash functions as opposed to autonumber would this work?
No, autonumberhash works just like autonumber except it calculates hashes internally and then autonumbers those.
You can use the hashXXX functions that generate hash values that always will return the same output for the same input. Then in the final app you can use the autonumber function to replace the hash strings with numbers so every unique key has the same unique number.