Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
m_perreault
Contributor 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

Tags (1)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Autonumber

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
3 Replies
MVP & Luminary
MVP & Luminary

Re: Autonumber

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
Contributor III

Re: Autonumber

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

MVP & Luminary
MVP & Luminary

Re: Autonumber

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