Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

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.

View solution in original post

6 Replies
Not applicable
Author

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

jagan
Luminary Alumni
Luminary Alumni

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
Specialist II
Specialist II

Hi

see attached image that will help you.

Create variable and assign QVUser Value

vUser = QVUser()

Thanks and Regards

Not applicable
Author

Wow!

Thanks a lot! It works fine!

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

Best regards,

Bjoern

Not applicable
Author

Thanks!

see above...

Best regards,

Bjoern

Not applicable
Author

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