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

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

0 Replies