Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
vish123
Creator III
Creator III

How to extract variable list from a Qlik Sense App? Is there any method in API that gives this output ? Pls suggest

Hi Team,

My requirement is to extract all variables info along with its definitions. Can anyone pls suggest a way to achieve this via API's?

Please suggest 

Labels (2)
2 Replies
stefanstoichev123

You can use the Engine API to create a session object that is retuning all variables. Something like this:

const variableList = {
    qInfo: {
      qType: "VariableList",
    },
    qVariableListDef: {
      qType: "variable",
    },
  };

  // create session object
  const sessionObj = await doc.createSessionObject(variableList);
  // get the layout of the session object
  const layout = await sessionObj.getLayout();

  // layout.qVariableList.qItems -> all variables definitions

  // you can dispose of the session object if you want
  // await doc.destroySessionObject(sessionObj.id);

 

stefanstoichev123_0-1655382376945.png

Stefan

Bill_Britt
Former Employee
Former Employee

Hi,

You can use the Variable API.

https://help.qlik.com/en-US/sense-developer/May2021/Subsystems/APIs/Content/Sense_ClientAPIs/Capabil...

 

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.