3 Replies Latest reply: Aug 21, 2014 6:35 AM by Mattias Malre RSS

    How to populate Extension 'definition' with async function return data

      Hi,

       

      In a typical extension javascript file, a return block contains a definition section which defines the properties for the extension. 

       

      The 'HorizList' extension, for example, contains the following code to show a dropdown for 'selection mode'

       

      selection : {

        type : "string",

        component : "dropdown",

        label : "Selection mode",

        ref : "selectionMode",

        options : [{

             value : "NO",

             label : "No selections"

        }, {

             value : "CONFIRM",

             label : "Confirm selections"

        }, {

             value : "QUICK",

             label : "Quick selection"

        }]

      }

       

      What I want to do is populate such a list with applications using a call to:


      qlikview.getAppList

       

      which is of course asynchronous... I have tried putting this call before the top return statement, but its callback is fired after the other code is returned, so I see nothing in the list!

       

      I hope I've made sense... any ideas would be much appreciated.

       

      Thanks,

      Shane.