Flow design in SAS Studio on SAS Viya is now more dynamic and reusable.
As of SAS Viya stable release 2026.03 you can configure parameters and prompts within flows, allowing users to provide input values at runtime without modifying code.
This allows flows to adapt to different inputs while keeping the underlying logic unchanged.
In SAS Studio flows, parameters and prompts work together to make flows reusable and flexible.
This flow includes two parameters that enable users to dynamically filter results based on Origin and MSRP columns.
A parameter is a named variable that stores a value used within a flow. Parameters are the same as SAS macro variables, they perform text substitution and can be referenced throughout the flow, including in SAS Program steps or steps that include filters.
A prompt is the user interface that allows someone running the flow to provide a value for that parameter at runtime. Prompts enable users to dynamically assign values through an interface such as input fields, date pickers, or drop-down lists.
In simple terms:
This allows the same flow to be reused with different inputs without modifying the flow itself.
If you’re familiar with prompts in Enterprise Guide, prompts in SAS Studio deliver the same flexibility within a modern, cloud-native flow architecture in SAS Viya. Instead of hardcoding values or updating steps each time a date, region, or threshold changes, you define a parameter once and allow users to provide values dynamically at runtime through prompts.
This makes flows more:
In short, prompts transform static flows into reusable and adaptable data pipelines.
Prompts support several input types that allow users to provide values at runtime. These values can be referenced throughout the flow to dynamically adjust logic without modifying the flow.
Prompt Types
The following prompt types are currently available:
Support for additional prompt types will continue to expand in future releases.
Supported Steps
Parameters can currently be used in the following flow steps:
Support for additional steps will expand in future releases, allowing parameters to be used across more parts of a flow.
This demonstration illustrates how to build a simple SAS Studio flow that uses parameters to control data filtering. The flow uses the CARS sample table and allows the user to dynamically filter results based on selected criteria.
A Query step is used to create an output table that filters records based on the selected Origin value. The Generate CSV File snippet is then used to produce a CSV file that contains only records where the MSRP is greater than a user-specified value.
Although both sets of filtering could be performed in a single Query step, the query output is designed to support additional processing. In a typical workflow, multiple steps can be connected to the output port of the query node, allowing the filtered dataset to be reused in further analysis or reporting.
**Video available or see the expanded steps below**
Starting with a blank flow, open the Parameters pane by selecting Parameters on the right vertical flow menu.
Blank flow canvas with the Parameters button highlighted on the right vertical pane.
a. Click Add in the Parameters pane.
Blank flow canvas with the Add button highlighted in the Parameters pane.
b. In the Add Parameter window, click the Name box and type Origin.
c. Leave Prompt at runtime checked.
d. Enable the Required checkbox to force the user to enter or select a value when the flow runs.
Add Parameter dialog window with the parameter named Origin.
e. Select the Properties tab.
f. Click the Control type drop-down menu and select Drop-down list.
g. Add a label of Choose an Origin: (this is the label users will see when prompted)
h. Select Dynamic list.
i. Select Browse and choose SASHELP.
j. Click the Table name box and enter CARS.
k. For the Column name, click Select a column, choose Origin and click OK.
l. For the Default item, click Select a value and select Europe and click OK.
m. Click OK.
The Properties tab in the Add Parameter window showing the dynamic list is configured from SASHELP.CARS
using the Origin column with a default value of Europe.
a. Click Add again in the Parameters pane.
Parameters pane with the parameter named Origin.
b. Click the Name box and type MSRP.
c. Leave Prompt at runtime checked.
d. Enable the Required checkbox to force the user to enter or select a value when the flow runs.
Add Parameter dialog window with the parameter named MSRP.
e. Click the Properties tab.
f. Leave Control type as Text or numeric field.
g. Add a label of Add an MSRP value:.
h. Click the Type drop-down and choose Numeric.
i. Select the Default value box and enter 50000.
j. Click OK.
Second parameter configured as a numeric input field.
Now that both parameters have been defined, they can be applied to the steps in the flow.
a. Click Library Connections in the navigation pane.
b. Expand SASHELP.
c. Right-click the CARS table and select Add to flow.
Library Connections is open and the SASHELP.CARS table is available to drag into the flow.
a. Right-click the CARS Table node and select Add a query to connect a Query node to the CARS table.
Flow canvas showing right-click mouse menu to Add a Query to the CARS table.
b. Use the Query node details and drag the t1(CARS) table from the Columns pane to the Columns tab within the Select tab to add all columns to the output table.
The Query node details show the populated Columns tab within the Select tab.
c. Select the Filter tab and expand the t1(CARS) table in the Columns pane.
d. Drag the Origin column to the Filter tab canvas.
Adding the Origin column to the Filter tab in the Query node details.
e. Use the Condition drop-down menu to select Equal to.
f. Select Use a quick filter to select a value to add a filter value.
The Use a quick filter to select a value icon highlighted in the Filter tab.
g. Use the Value drop-down menu to choose Select a parameter.
Select a parameter highlighted in the Add Filter window.
h. In the Select a Parameter window, select Origin.
i. Click OK.
Select a Parameter window enabling selection of the parameters.
j. Click Filter and notice that a parameter icon appears above the Query node in the canvas, indicating that parameters have been successfully applied to the node.
Filter tab showing Origin parameter assigned to the Filter Value.
a. Click Snippets in the navigation pane and expand Standard and Data.
b. Drag Generate CSV File onto the output port of the Query node to connect it.
Canvas showing Generate CSV File snippet being connected to Query output port.
a. In the Code tab of the SAS Program node details, highlight <location on file system to put the CSV file>.
b. Click SAS Server in the Navigation pane and expand SAS Server.
c. Right-click Files and select Insert as path. If this option is not available in your environment, choose an alternative writable directory.
Insert as path feature for adding path to a code node.
a. After the /, add &Origin.GT&MSRP..csv. The & tells SAS to substitute the parameter values at runtime, and the single period(.) ends the macro variable name and the double period (..) ends the macro variable name while preserving the .csv file extension.
SAS Code showing &Origin.GT&MSRP..csv. used as the file name.
a. In the Node tab of the SAS Program node details, click Ports and variables.
b. In the Input Ports and Macro Variables tab, copy _input1, the macro variable that will store the name of the input table for the step.
SAS Program node details showing Ports and variables section in Node tab.
c. Return to the Code tab in the SAS Program node details and replace the hardcoded table name SASHELP.CARS with the contents of the buffer, _input1.
d. Prefix _input1 with an ampersand (&_input1) to indicate that it’s a macro variable, allowing SAS to resolve it dynamically at runtime.
Code tab in the SAS Program node showing macro variable &_input1 used for SAS input table name.
a. After &_input1 , add (where=(MSRP>&MSRP)) to filter the data so only records with an MSRP greater than the selected parameter value are exported.
Code tab in the SAS Program node details showing WHERE=option.
a. In the Node tab of the SAS Program node details, select the Parameters section.
b. Click Add.
Add button highlighted in the Parameter section of the Node tab in the SAS Program node details.
c. In the parameter list, click MSRP.
d. Click OK and notice that a parameter icon appears above the SAS Program node in the canvas, indicating that parameters have been successfully applied to the node.
Select a Parameter window with MSRP selected.
a. Click Run on the flow toolbar.
b. Confirm the Parameters dialog box appears and has the default values of Origin as Europe and MSRP as 50,000.
c. Click OK.
At run time, SAS Studio prompts for both Origin and MSRP.
d. View the log and confirm the CSV contains only records for the selected Origin and MSRP threshold.
Shows EuropeGR50000.csv with 39 rows.
a. Click the Origin drop-down menu and choose Asia.
b. Click OK.
The recording also shows the prompt values changed before clicking OK.
c. View the log and confirm the CSV contains only records for the selected Origin and MSRP threshold.
Shows AsiaGR50000.csv with 7 rows
This flow demonstrates how dynamic prompts can be used to create flexible and reusable processes in SAS Studio.
The flow consists of three main components:
By combining these components, the flow highlights how parameters enhance interactivity and reusability, allowing users to run the same flow with different inputs without modifying the code.
To maintain clear and effective flows:
Using parameters in SAS Studio transforms static flows into dynamic, reusable flows. Rather than repeatedly modifying code, you can:
This approach improves efficiency, reduces the risk of errors, and supports the development of more robust processes.
As SAS Studio continues to evolve, this functionality is expected to expand, with parameters being supported across more steps and additional parameter types becoming available.
Special thanks to the SAS Studio Product Manager, @Alexey_Vodilin , and Stacey Syphus for editing, contributions, and valuable suggestions for improving this article. Special thanks also to the whole SAS Studio Product team for developing and delivering this feature.
If you are interested in learning more about SAS Studio, please visit the SAS Studio Landing page and the SAS Studio Learning Subscription.
Find more articles from SAS Global Enablement and Learning here.
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.