Qlik Community

QlikView License & User Management

Discussion Board for collaboration on QlikView License & User Management.

Not applicable

how to store username in variable?

Hello!

I just started with QlikView, and there are a lot of Questions, I hope someone can help me:

I have installed QlikView Desktop Version 10, and I want to influence which user is allowed to see wich Objects.

Since I have no Server-Version, I have to do it with variables.

I created a hidden script as follows:

 

Section Access;

Access01:

LOAD * INLINE [

    ACCESS, USERID, PASSWORD

    ADMIN, bjoern, neoliv

    USER, test1, test1

    USER, test2, test2

];

Section Application;

Now I want to store the User-ID in a varable, which I can use in the "Show - Conditional" area of the different objects.

My Problem is, that I do not know, how I can store the user-ID in such a variable.

Can anybody help?

Or is there another way to control, which user can see which objects (without Server-Version)?

Thanks and best regards,

Bjoern

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: how to store username in variable?

Hi,

Create a variable and give

=QVUser()

This will get you current user name accessing the Qlikview file in Server.

=OSUser()

For getting the username in desktop.

Regards,

Jagan.

6 Replies
Not applicable

Re: how to store username in variable?

Hi Bjoern

You need to load an additional table which will hold you role data and the 'variable'  - which is not a variable but a field value.  I've amended a pre-existing example I have with your  usernames and passwords.  I have given your admin role 1 and your users role 0 - this field value is then used in the conditional shows of the Sheets and buttons.

Have a look and let me know if you have any questions.

Reagrds


Steve

MVP
MVP

Re: how to store username in variable?

Hi,

Create a variable and give

=QVUser()

This will get you current user name accessing the Qlikview file in Server.

=OSUser()

For getting the username in desktop.

Regards,

Jagan.

vishalwaghole
Valued Contributor II

Re: how to store username in variable?

Hi

see attached image that will help you.

Create variable and assign QVUser Value

vUser = QVUser()

Thanks and Regards

Not applicable

Re: how to store username in variable?

Wow!

Thanks a lot! It works fine!

I hope my skills will improve so that I can also answer questions soon...

Best regards,

Bjoern

Highlighted
Not applicable

Re: how to store username in variable?

Thanks!

see above...

Best regards,

Bjoern

Not applicable

Re: how to store username in variable?

Thanks very much!

I tried the Example, but I can login only with Admin-Users.

Doesn' matter, the guys below gave me the right answer.

Nevertheless I will check out your idea, it seems to be also very interesting

best regards,

Bjoern

Community Browser