Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

objetct doesn´t hide when using show conditional

hello! i´m trying to use show conditional for some objetcs but it doesn´t work. i write: Conditional = OsUser('SERVER\User1'). If i create a text object with the osuser it´s shown OK but not the condition.

thanks!!

6 Replies
Not applicable
Author

*edited because John is all over it*

Not applicable
Author

*edited because John is all over it*

johnw
Champion III
Champion III

I don't think you want to use purgechar, even if it happens to be working for you. It isn't just removing the server name. It's removing all the CHARACTERS in the server name. So if your server name is 'Server3' and you have users 'Bob', 'Bill' and 'Beth', you'll get the following:

User purgechar(osuser(),'Server3\')
Bob Bob
Bill Bill
Beth Bth

What happened to Beth's user ID? Well, 'e' is one of the characters in 'Server3\', so it got purged. So if you check for purgechar(osuser(),'Server3\')='Beth', it won't be true, even when Beth IS the user.

Lots of other ways to do it, though. I'd probably use this:

subfield(osuser(),'\',2) = 'Beth'

And QlikView function names appear to be caps insensitive, so you shouldn't need to capitalize the S in OSUser, or any other character in it.

vupen
Partner - Creator
Partner - Creator

Before trying anything else, please verify the document properties:

Settings-->Document Properties-->Security Tab: Show All Sheets and Objects.

If this check box is selected, all objects/sheets are shown, even if a condition is defined.

When this checkbox is cleared, you can see the effect of the condition written.

Upendra

Not applicable
Author

hello Upendra. i didn´t know this checkbox but i tried and It doesn´t work. The checkbox was crear anyway. Thank you very much.

pablo

Not applicable
Author

it worked writing : osuser()=('server\user')

thanks