Hi all,
I am trying to display a multiple user prompts based on yes or no value in previous prompt.
Logic:
Consider Prompt 1 as Runtype with list values "Automatic" and "Manual".
Prompt 2 as date picker
prompt 3 as text user input
If user selects "Manual" for prompt 1 then in the next window or in same window user should get prompted with prompt 2 and prompt 2 asking repective inputs.
IF the user selects "Automatic" the value have to assign automatically for those two prompt. This automatic value assigning is completed.
code logic for autoasigning Value for prompt 2 if "Automatic"
data _null_;
tday=today();
put tday YYMMD.;
lastDay=intnx ('month',tday,-1,'E');
if weekday(lastDay) = 1 then lastDay = lastDay-2;
else if weekday(lastDay)= 7 then lastDay = lastDay-1;
mydate=put(lastday,DATE9.);
CALL SYMPUT ("mydate", mydate);
run;
%let process_date_Cm = "&mydate"d;
%put &process_date_Cm.;
code logic for autoasigning Value for prompt 3 if "Automatic"
data DDMMC;
tday=today();
put tday DDMMYYN6.;
chardate = put(tday,DDMMYYN6.);
Todate = substr(chardate, 1, 4) ;
DDMM = input(Todate,best5.);
put DDMM;
/* type = vtype(DDMM);*/
/* put type;*/
CALL SYMPUT ("DDMM", DDMM);
run;
%let DDMM = &DDMM;
%put &DDMM.;