Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
dionverbeke
Partner - Creator III
Partner - Creator III

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