Skip to main content
Inspiring
May 17, 2018
Answered

Get a list of all variables used in a project in a console

Hi there,

hopefully this has a short answer.

How can I open the developer tools with F12 and in the console get a list of all the custom variables that I have used in the project?

Thank you in advance

B

    This topic is closed to new replies. Start a new post to keep the conversation going.
    TLCMediaDesign
    TLCMediaDesignCorrect answer
    Inspiring
    May 17, 2018

    Thanks David

    I know how to get the values once I get the names, so I would like to get a list of the (custom) variables in a project.


    This will show all of the custom variables and their values. If it does not have a value, it will be blank.

    var myVars = cp.ReportingVariables.split(",");

         myVars.forEach(function(vars) {

          console.log(vars+" = "+window[vars]);

         });

    6 replies

    Eric Dumas
    Community Expert
    Community Expert
    May 17, 2018

    Hi,

    Please confirm that your are using a Windows OS and F12 relates to Internet Explorer.

    You will see the list of variables in your Captivate interface.

    I would expect the server to process the values/variables before it arrives at the browser (server side).

    Translate
    Inspiring
    May 17, 2018

    Thanks for your reply Eric

    Yes, I use Windows and IE.

    My goal is to be able to get a list of all variables in the console of the browser, not in Captivate

    Translate
    TLCMediaDesign
    Inspiring
    May 17, 2018

    Do you just want to see the variables or their values also?

    Translate