SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 60267: Using an HTML form to provide values for prompted SAS® Stored Processes executed in the modern version of SAS® Visual Analytics Viewer

DetailsDownloadsAboutRate It

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:

image label

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:


image label

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.

  1. Log on to the SAS Management Console with an account that has the ability to import a SAS Package file.
  2. 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.
  3. On the first three pages of the Import SAS Package wizard, click Next to accept the defaults. 
  4. On the fourth page of the wizard, confirm or select the SAS® Application Server used by SAS Visual Analytics. Click Next.
  5. (Optional) On the last page of the wizard, click View Log and confirm that there were no warnings or errors.
  6. 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

  1. Log on to SAS® Visual Analytics Designer to create a new report.
  2. From the Objects tab, select the Stored Process object beneath Other and drag it onto the canvas.
  3. 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.
  4. 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.
  5. Save the report.
  6. Log off from SAS Visual Analytics.

Testing the stored processes in modern SAS Visual Analytics Viewer

  1. Log on to the modern version of SAS® Visual Analytics Viewer.
  2. Navigate to the report that you just saved and open it. You should see the HTML form shown in Figure 1.
  3. Select some values and click Submit.
  4. 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.