Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

OmarBenSalem
Esteemed Contributor

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
Highlighted
OmarBenSalem
Esteemed Contributor

Re: Enable selection on system function; especially OSUSER() function

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

1 Reply
Highlighted
OmarBenSalem
Esteemed Contributor

Re: Enable selection on system function; especially OSUSER() function

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

Community Browser