Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

Luminary
Luminary

Tieing a promise to a UI object

Hi all,

I'm still struggling with the promises paradigm to include in the paradigm:

var p = global.getAuthenticatedUser(function(reply){

             alert('User:'+reply.qReturn);

var  v =  reply.qReturn;

  console.log(reply.qReturn);

 

  console.log(afe_encryptUser(v));

  

  });

Later in the code I have to display the authenticated user.

How do I get to use the reply.qReturn if the call is asynchronous?

If I include the layout code inside the promise I don't have access to the layout and $element of the paint function.

Does some have example code how to achieve this?

Kind Regards,

Dion

Community Browser