Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

3 Replies
Mattias_Malré
Employee
Employee

Hi Shane

Is this for QlikView or Qlik Sense?

Thanks in advance

-Matt

I accept cookies.
Not applicable
Author

Hi Matt,

Qlik Sense

Thanks,

Shane.

Mattias_Malré
Employee
Employee

Awesome, thanks!

I'll have a look and see if we can help you as soon as possible. '

All the best

-Matt

I accept cookies.