Validate Getapplist and store the value in console
I'm trying to check by this code snippet, but it's not working any insights, how to validate; if the list is not present, redirect or log it for now?: /* * Basic responsive mashup template * @owner Enter you name here (xxx) */ /* * Fill in host and port for Qlik engine */ var prefix = window.location.pathname.substr( 0, window.location.pathname.toLowerCase().lastIndexOf( "/extensions" ) + 1 ); var config = { host: window.location.hostname, prefix: prefix, port: window.location.port, isSecure: window.location.protocol === "https:" }; require.config( { baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources" } );require( ["js/qlik"], function ( qlik ) { qlik.setOnError( function ( error ) { $( '#popupText' ).append( error.message + "<br>" ); $( '#popup' ).fadeIn( 1000 ); } ); $( "#closePopup" ).click( function () { $( '#popup' ).hide(); } );
let myPromise = new Promise(function(myResolve, myReject) { let x = 0; var str = ""; qlik.getAppList(function(list,rep){