Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
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
MVP & Luminary
MVP & Luminary

Re: Generate an auto value for field

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

- Marcus

View solution in original post

9 Replies
MVP & Luminary
MVP & Luminary

Re: Generate an auto value for field

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

- Marcus

View solution in original post

Re: Generate an auto value for field

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

Not applicable

Re: Generate an auto value for field

It worked!
Thank you!

MVP & Luminary
MVP & Luminary

Re: Generate an auto value for field

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

Re: Generate an auto value for field

marcus_sommer‌ is Hash128 a pure hash-function?

MVP & Luminary
MVP & Luminary

Re: Generate an auto value for field

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

- Marcus

Re: Generate an auto value for field

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

MVP & Luminary
MVP & Luminary

Re: Generate an auto value for field

AFAIK - yes.

Re: Generate an auto value for field

Thanks Marcus