@XavierBizoux I've executed the job definition per your post in SAS Studio, but I don't see any values in any of the dropdown. Am I making any mistake? Thanks in advance.
SAS Code what I used is,
%global originStmt typeStmt driveTrainStmt invoiceStmt;
%macro generate;
%if %symexist(var_origin) %then %let originStmt = origin in ("&var_origin") and;
%if %symexist(var_type) %then %do;
%let typeList = ;
%if %symexist(var_type_count) %then
%do i=1 %to &var_type_count;
%let typeList = "&&var_type&i", &typeList ;
%end;
%else %let typeList = "&var_type";
%let typeStmt = type in (&typeList) and;
%end;
%if %symexist(var_driveTrain) %then %let driveTrainStmt = driveTrain in ("&var_driveTrain") and;
%if %symexist(var_invoice) %then %let invoiceStmt = invoice < &var_invoice ;
%else %let invoiceStmt = invoice > 0;
%mend;
%generate;
proc print data=sashelp.cars;
where &originStmt &typeStmt &driveTrainStmt &invoiceStmt;
run;
HTML code which I used is,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Job with Dynamic prompts</title>
</head>
<script src="/SASJobExecution/resources/sap/ui/thirdparty/jquery.js"></script>
<script src="/SASJobExecution/resources/dynamic.min.js"></script>
<style>
details div {
padding: 1em;
}
summary {
margin-top: .5em;
font-size: large;
font-weight: bold;
}
label {
display: block;
}
select {
margin-left: 1em;
margin-top: 1em;
min-width: 10em;
}
input[type="range"] {
margin-left: 1em;
margin-top: 2em;
width: 40em;
float: left;
vertical-align: middle;
}
input[type="submit"] {
padding: 0.5em;
}
.displayValue {
margin-left: 1em;
margin-top: 1em;
border-radius: 0.5em;
border-color: grey;
border-style: solid;
float: left;
width: 5em;
height: .6em;
vertical-align: middle;
padding-top: .5em;
}
</style>
<body onload="SASDynamic.init()">
<form action="/SASJobExecution/" target="_tab">
<input type="hidden" name="_program" value="$PROGRAM$">
<input type="hidden" name="_action" value="execute">
<input type="submit" value="Submit">
<hr>
<details>
<summary>Geography</summary>
<div>
<label for="var_origin">Choose a geographic location:</label>
<select name="var_origin" id="var_origin" data-colname="origin" data-library="SASHELP" data-table="CARS"></select>
</div>
</details>
<details>
<summary>Car's characteristics</summary>
<div>
<label for="var_type">Choose one or multiple car types:</label>
<select name="var_type" id="var_type" data-colname="type" multiple size="10" data-library="SASHELP" data-table="CARS" data-uses="var_origin"></select>
</div>
<div>
<label for="var_driveTrain">Which kind of drive train do you want:</label>
<select name="var_driveTrain" id="var_driveTrain" data-colname="drivetrain" data-library="SASHELP" data-table="CARS" data-uses="var_origin, var_type"></select>
</div>
</details>
<div data-visible="var_origin,eq,Asia">
<details>
<summary>Financial aspect</summary>
<div>
<label for="var_invoice">What is the maximum price you want to pay?</label>
<div id="invoiceValue" class="displayValue"></div>
<input type="range" id="var_invoice" name="var_invoice" min="10000" max="150000" value="50000" step="1000" data-uses="var_origin">
</div>
</details>
</div>
</form>
<script>
document.getElementById("var_invoice").addEventListener("change", (e) => {
document.getElementById("invoiceValue").innerHTML = e.target.value
})
</script>
</body>
</html>
... View more