Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I wanna get a OSuser on macro?Anyone knowns hown can i get that?

On application.....we have a OSuser() function.....

but i need run a macro and get a user from AD.......anyone knowns if s it possible???

or

another idea how can i do this???i need select a field based on user access and lock the aplication!!!!

tks

1 Solution

Accepted Solutions
Not applicable
Author

Sure, set a variable to the value =OSUser(), then refer to the variable in your macro.

ActiveDocument.Variables('vOSUser').GetContent.String


You may also be able to use Evaluate and the OSUser function directly and I think there is an equivilent function in VB Script, but I tend to use QlikView variables in these situations, because I don't have to look up the other functions.

View solution in original post

5 Replies
Not applicable
Author

Sure, set a variable to the value =OSUser(), then refer to the variable in your macro.

ActiveDocument.Variables('vOSUser').GetContent.String


You may also be able to use Evaluate and the OSUser function directly and I think there is an equivilent function in VB Script, but I tend to use QlikView variables in these situations, because I don't have to look up the other functions.

Not applicable
Author

NMiller's way is working, if you want more VB Script based function check on documents but not all functions of VB Script are compatible with Qlikview.

Not applicable
Author

NMiller,

i try to use that....but without success!!!!!

Any idea???

tks

Not applicable
Author

Maybe your variable is set up incorrectly? Did you put an equals sign before OSUser?

=OSUser()


I've attached a simple example where it reads the OSUser from a variable and displays it in a MsgBox from a macro.

Not applicable
Author

The problem was equal sign.....

tks a lot Miller