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: 
OmarBenSalem

Enable selection on system function; especially OSUSER() function

Hi everybody,

I'm currently creating an extension, but now I'm facing some trouble; let me explain it:

I want to be able to SELECT the OSUSER().

In fact, each User will have the possibility to comment on some alerts. the user ID is written as follow:

=SubField( SubField( OSUser(),';',1),'=',2)&'\'&SubField( SubField( OSUser(),';',2),'=',2)


What I do, is in my Javascript file, I want to revoer this and put it in the UserID field of the extension:

var selState = app.selectionState( );

            var listener = function() {

            $scope.userID=selState.selections[0].selectedValues[0].qName;

            };

            selState.OnData.bind( listener );

BUT. when I click on it: the OSUSER(), It won't appear on the selections area and thus I can recover it using this:

        $scope.userID=selState.selections[0].selectedValues[0].qName;


Capture.PNG


What should i do?

How could I recover the OSUSER() and being able to select it?

Thanks !

1 Solution

Accepted Solutions
OmarBenSalem
Author

I found a way to do it;

connect to excel file where all the UserIDs are ;

and create a master dimension as follow:

if (UserID=SubField( SubField( OSUser(),';',1),'=',2)&'\'&SubField( SubField( OSUser(),';',2),'=',2),UserID, null())

with each one will have only his UserID that appears and can select it

View solution in original post

1 Reply
OmarBenSalem
Author

I found a way to do it;

connect to excel file where all the UserIDs are ;

and create a master dimension as follow:

if (UserID=SubField( SubField( OSUser(),';',1),'=',2)&'\'&SubField( SubField( OSUser(),';',2),'=',2),UserID, null())

with each one will have only his UserID that appears and can select it