Sample 60267: Using an HTML form to provide values for prompted SAS® Stored Processes executed in the modern version of SAS® Visual Analytics Viewer
Overview
The modern version of SAS Visual Analytics Viewer does not enable you to enter prompt values for stored processes. This sample explains how you can create an HTML form that enables you to enter prompt values before SAS Visual Analytics executes the stored process.
Note: For information about how prompts are handled in modern viewer, see SAS Note 57009.
The following display is an example of the HTML form:

Figure 1. An HTML form for entering prompt values
The following display shows the output of the stored process after you enter values into the form:

Figure 2. Stored process results using values entered into the HTML form
Requirements
Beginning with release 7.3, modern is the default appearance for SAS Visual Analytics Viewer. So, this sample applies to releases 7.3 and 7.4.
You also must be able to log on to SAS® Management Console and register a stored process.
Importing the stored processes
This sample includes two stored processes that you can adapt for your own needs. As long as you import the stored processes to Shared Data ► Stored Processes, you can test the stored processes without making any modifications. If you choose a different location, the Downloads tab has instructions for modifying the code.
- Log on to the SAS Management Console with an account that has the ability to import a SAS Package file.
- On the Folders tab, right-click the folder where you want to store the stored processes and select Import SAS Package. The sample code expects the folder to be Shared Data ► Stored Processes.
- On the first three pages of the Import SAS Package wizard, click Next to accept the defaults.
- On the fourth page of the wizard, confirm or select the SAS® Application Server used by SAS Visual Analytics. Click Next.
- (Optional) On the last page of the wizard, click View Log and confirm that there were no warnings or errors.
- Click Finish. You should now see two new stored processes in the folder: Form and Target.
You are now ready to test the stored processes in SAS Visual Analytics.
Creating a report that uses the stored processes
- Log on to SAS® Visual Analytics Designer to create a new report.
- From the Objects tab, select the Stored Process object beneath Other and drag it onto the canvas.
- In the Open dialog box, navigate to where you stored the Form stored process, and then click Open. You should see the HTML form shown in Figure 1.
- To confirm that the stored processes are working as expected, select some values for the prompts and then click Submit. The Target stored process should execute and display results similar to those shown in Figure 2.
- Save the report.
- Log off from SAS Visual Analytics.
Testing the stored processes in modern SAS Visual Analytics Viewer
- Log on to the modern version of SAS® Visual Analytics Viewer.
- Navigate to the report that you just saved and open it. You should see the HTML form shown in Figure 1.
- Select some values and click Submit.
- The Target stored process should execute and display results similar to those shown in Figure 2.
Additional resources
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The sample code expects the stored processes to be stored in a folder named Shared Data ► Stored Processes. If you import the stored processes into a different metadata folder location, then you must do the following:
- Right-click the Form stored process and select Properties.
- Click Edit Source Code.
- Scroll down to line 22, and edit the PUT statement to point to the folder where you stored the Target stored process.
ZIP file containing the SAS Package file
Date Modified: | 2017-08-11 10:17:29 |
Date Created: | 2017-04-07 09:38:25 |
Operating System and Release Information
SAS System | SAS Visual Analytics | Microsoft® Windows® for x64 | 7.3 | | 9.4 TS1M3 | |
Linux for x64 | 7.3 | | 9.4 TS1M3 | |