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

Announcements
Catch up on the newest Qlik features and improvements: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Ajay_S1
Contributor II
Contributor II

Get Session Variable Value using variable Name

Hi All, 

I have created a session variable using below code

    const sessionVariable = await doc.createSessionVariable({
      qInfo: {
        qType: "variable",
      },
      qName: TestVariable,
      qComment: comment,
      // Store as a Qlik text value
      qDefinition: `"${variableValue}"`,
      qIncludeInBookmark: true,
      qMetaDef: {},
      qConstraints: {
        qType: "any",
      },
    });
 
Can any one please help here how to get the value of session variable.
Labels (5)
1 Reply
Ajay_S1
Contributor II
Contributor II
Author

Hi all,

const getSessionVariable = await doc.getVariableByName("TestVariable")
 
I have tried the above code to get the variable value. But this code not returning any session variable