Skip to content

script.checkbox ​

Asks the user running the process to tick or untick a checkbox. Call it in pre(). The answer is available to the rest of the process as a true or false variable with the name you give it.

js
script.checkbox(messageToUser, variableName, checked)

Parameters ​

ParameterTypeDescription
messageToUserstringThe label to show next to the checkbox.
variableNamestringThe name of the variable to store the answer in.
checkedbooleanWhether the checkbox starts ticked.

Examples ​

js
function pre() {
    script.checkbox("Include prior year", "includePriorYear", false);
}

function begin() {
    if (includePriorYear) {
        console.log("Loading prior year as well");
    }
}