Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How may I get in Edit Module the user connected?

HI,

How may I get in Edit Module the user connected?

I would like to set default filters depending on current user.

I have create a button and a macro

sub selectDefault

ActiveDocument.ClearAll

Myuser = QVUser ()

if Myuser = "XX" Then ….

But it doesn't work. The error message (in edit module) is

Type mismatch: 'QVUser'

How I can do it?

Thanks

Best Regards

Marilena

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

thanks a lot both of you (Ivan and Barry)

I'll do both solutions because some of my users are managers Wink and I have to configure everything for their users

Ciao

Marilena

View solution in original post

3 Replies
Not applicable
Author

Hi there, you are having that error because you are trying to evaluate qlikview functions directly in the macro script, this can only be accomplish in the following manner:

sub selectDefault

ActiveDocument.ClearAll

Myuser = ActiveDocument.Evaluate("qvuser()")

end sub

Best Regards

Not applicable
Author

Hi Marilena,

My suggestion is to let the users create their own personal bookmarks and not program it at all. You don't want to have to keep updating your program whenever there's a new user or a user decides he wants different filters.

Regards,

Barry

Not applicable
Author

Hi,

thanks a lot both of you (Ivan and Barry)

I'll do both solutions because some of my users are managers Wink and I have to configure everything for their users

Ciao

Marilena