BookmarkSubscribeRSS Feed
Abinandhans
Calcite | Level 5

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.;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 565 views
  • 0 likes
  • 1 in conversation