Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
m_perreault
Creator III
Creator III

Autonumber

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

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand
m_perreault
Creator III
Creator III
Author

Thanks Gysbert, if I were to use either of the autonumberhash functions as opposed to autonumber would this work?

Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand