BookmarkSubscribeRSS Feed
dav_amol
Calcite | Level 5

I have created a web application using 2 stored process to fulfill dynamic and cascaded prompt requirements. First Stored process creates a HTML form which allows users to input all the parameters. After clicking Submit button , this form gets submitted and executes another stored process which generates the chart corresponding to given input parameters. This web application works as expected. 

 

    However now we want to have given form and chart to be displayed on same page . ( say form generated with first Stored process on left side and output chart in rightside. ( something similar to SAS Dashboard ) . Could you please help us to achieve this goal? 

 

code generating Form is as given below : 

 

/* This stored process creates a custom HTML FORM that is */
/* used to execute another stored process. */
/* */
/* Insert your HTML statements after the CARDS4 statement. */
/* Modify the "%let stpname" statement to specify the name */
/* of the next stored process that is to be executed. */
/* Any macro variables in the INPUT cards will be resolved */
/* if the values are known. */

/* stpname is the name of the next stored process to be executed */


%let stpname=/Stored Processes/Test/Custom_Map_v4;

data _null_;
format infile $char256.;
input;
infile = resolve(_infile_);
file _webout;
put infile;
cards4;

 


<!DOCTYPE html><html class=''>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=7,8,9,11">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/MapVisualization/css/custom_Maps.css" rel="stylesheet">
</head>

<body>

<div class="container">
<form class="well form-horizontal" ACTION="&_URL" id="contact_form" METHOD = "post">
<INPUT TYPE="HIDDEN" NAME="_program" VALUE="&stpname">
<fieldset>

<div class="form-group trade_date required" data-cid="trade_date">
<label class="control-label col-md-2 requiredField" for="trade_date">Trade Date
<span class="asteriskField"></span>
</label>
<div class="col-md-4">
<div class="input-group date"><span class="input-group-addon left"><i class="fa fa-calendar"></i> </span>
<input type="text" class="form-control datepicker" id="trade_date" name="trade_date" value=""
data-rule-required="true"
data-datepicker-format="mm/dd/yyyy" />
</div>
</div>
</div>


<!-- Select Market Type -->

<div class="form-group">
<label class="col-md-2 control-label">Market Type
</label>
<div class="col-md-4 selectContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-list"></i></span>
<select name="market_type" class="form-control selectpicker" >
<option selected value="DA">DA</option>
<option value="RTPD">RTPD</option>
<option value="RTD">RTD</option>
<option value="HASP">HASP</option>

</select>
</div>
</div>
</div>

<!-- Button -->
<div class="form-group">

<div class="col-md-11" style="border-bottom-color: rgb(204, 204, 204); border-bottom=1px">
<button type="submit" class="btn btn-warning pull-right" >Run <span class="glyphicon glyphicon-send"></span></button>
</div>
</div>

</fieldset>
</form>
</div>
<script src="/MapVisualization/js/jquery.min.js" type="text/javascript" ></script>
<script src="/MapVisualization/js/jquery-ui.min.js" type="text/javascript"></script>
<script src='/MapVisualization/js/stopExecutionOnTimeout-53beeb1a007ec32040abaf4c9385ebfc.js' type="text/javascript" ></script>
<script src='/MapVisualization/js/bootstrap.min.js' type="text/javascript" ></script>
<script src='/MapVisualization/js/bootstrapvalidator.min.js' type="text/javascript"></script>
<script src="/MapVisualization/js/bootstrap-datepicker.min.js" type="text/javascript"></script>
<script src="/MapVisualization/js/jquery-ui-slider-pips.js" type="text/javascript" ></script>
<script src="/MapVisualization/js/bootstrap-colorpicker.js" type="text/javascript" ></script>
<script src="/MapVisualization/js/jquery.multiple.select.js" type="text/javascript"></script>
<script src="/MapVisualization/js/date.js" type="text/javascript"></script>
<script src="/MapVisualization/js/custom_Maps.js" type="text/javascript"></script>

</body>

</html>


;;;;
run;

2 REPLIES 2
XavierBizoux
SAS Super FREQ

Hi

 

I think that the following note describes what you want to achieve.

 

http://support.sas.com/kb/43/723.html

 

Have a good day

Xavier BIZOUX
Advisory Technical Architect ● Global Enablement and Learning
Technology Transfer and Governance, R&D
dav_amol
Calcite | Level 5

Hi, 

 

   Thanks for the response. This was really helpful. However when I tried to use this solution , It is taking me to index page of SAS Stored process Web Application instead of displaying the form in leftside iframe. Could you please help me to resolve this issue and display the form in left frame ?  Here the Stored process DMM_Map_Visualization3 generates the form with custom inputs and code is given earlier. We are trying to execute that stored process in leftside frame so that it will display the form in left window. However it's always displaying index properties window listing sample stored processes.  

 

My code is as given below :

 

%let stpname=/Prod/Market Monitoring/Stored Processes/Test/DMM_Map_Visualization3;

data _null_;
format infile $char256.;
input;
infile = resolve(_infile_);
file _webout;
put infile;
cards4;
<HTML>
<head><title>Frame test</title></head>
<table style="width:100%">
<tr>
<td width="50%">
<iframe scrolling="no" width="100%" height="1000"
src="http://sasprod:40356/SASStoredProcess/do?_program=&stpname.&_action=form,properties,newwindow,nobanner&_target=rightside" name="leftside">
</iframe>
</td>
<td width="50%">
<iframe src="" name="rightside" width="100%" height="1000">
</iframe>
</td></tr>
</table>
</HTML>
;;;;
run;


Stored_Process_Web_Application_Index_page.JPG

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1317 views
  • 1 like
  • 2 in conversation