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: 
Not applicable

Generate an auto value for field

Hey everyone,

Im working on a tool that includes User Id's, but those Id's are part of the user's privacy.
To counter that privacy problem, I want to generate an auto number for each user ID.

Like this for example.

ID000891 > 138732

ID000892 > 587453

Is it possible to change all user Id's to autogenerated values?

Thanks in advance,

Ivo

1 Solution

Accepted Solutions
marcus_sommer

Take a look on: autonumber([User ID]) or maybe hash128([User ID]).

- Marcus

View solution in original post

9 Replies
marcus_sommer

Take a look on: autonumber([User ID]) or maybe hash128([User ID]).

- Marcus

sunny_talwar

Not sure about Hash128, but with AutoNumber, these unique ids would have a potential to change after each reload....

Not applicable
Author

It worked!
Thank you!

marcus_sommer

Yes the autonumber- respectively autonumberhash-functions could change with each reload and is therefore only within a single application "really" valid. But if you for example implement it within the generation of a dimension-table-qvd of the personal-data which is ordered or you made it ordered in an extra field - it could be applied over many applications either as the to displaying field with the origin User ID as key or the origin User ID could be replaced with it per mapping.

A pure hash-function instead will always return the same output by identical input-values.

- Marcus

sunny_talwar

marcus_sommer‌ is Hash128 a pure hash-function?

marcus_sommer

Yes - I think so: http://www.qlikfix.com/2014/03/11/hash-functions-collisions/ and potential hash-collisions are rather not relevant.

- Marcus

sunny_talwar

So this survives load after load? and between different QVW files?

marcus_sommer

AFAIK - yes.

sunny_talwar

Thanks Marcus