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

Announcements
Join us at Qlik Connect 2026 in Orlando, April 13–15: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
rbecher
Partner - Master III
Partner - Master III

Backend Api getSelections

Hi,

is there any method to get the current selections of the app?

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
10 Replies
ErikWetterberg

Hi Ralf,

getList is actually not meant for use in extensions, though there might be situations when it is useful (like if you create stuff dynamically). Like Johan said, it will create a second GenericObject, but you are really after adding more stuff to the one you already have.

You do this in initialProperties, which are used to initialize your objects properties on creation. If you add a qSelectionObjectDef to your initialProperties you will get info about current selections in your layout. Something like this:

initialProperties : {

     qSelectionObjectDef:{ 

     },

     qHyperCubeDef:{

......

}

You can do this for all the list and combine it with qHyperCubeDef, qListObjectDef etc. The Toolbar extension example uses this to get lists of Fields and Bookmarks:

initialProperties : {

     version : 1.0,

     qBookmarkListDef : {

          qType : "bookmark",

          qData : {

               title : "/title",

               description : "/description"

          }

     },

     qFieldListDef: {}

}

Erik