BookmarkSubscribeRSS Feed

SAS Studio Custom Steps: Reduce, Reuse & Recycle Part I

Started ‎12-21-2023 by
Modified ‎12-21-2023 by
Views 273

In my previous post, Explaining Custom Steps using Studio Assets, we used a template to create a custom step and examined the components to get a high-level overview of what is needed to build a custom step. During this post, we will discuss how you can reduce setup and configuration time when creating custom steps by reusing the controls in the Sample Controls custom step. Watch out for my next post where we will discuss how to recycle custom steps using the SAS Studio Custom Step Repository.

 

Investigating Controls

 

The Sample Controls custom step is a fabulous asset for exploring and reusing controls for your own custom steps. Before we consider how to reduce the setup and configuration time, let’s use the Sample Controls custom step to investigate what some of the controls do.

 

  1. Click 01_GR_FlowStep.png in the navigation pane to access the Steps section.
  2. On the Steps toolbar click 02_GR_NewStarburst.png and select Sample Controls.
  3. Each custom step must have a minimum of one page. The Sample Controls custom step has 4 different pages. This can be seen in the topmost section of the Control Library. We will review some of the controls in the Data and Control pages. By default, the first page, Data, is selected. Looking at the properties of the page control, we can see there are two options available, ID and Label. Both have a red asterisk which indicates that they are required.

 

03_GR_1_Pages-2.png

Select any image to see a larger version.
Mobile users: If you do not see this image, scroll to the bottom of the page and select the "Full" version of this post.

 

  1. Let’s look at some of the other controls in the Data page control.

The control labelled Input data control is a section control. Section controls can be expanded and collapsed to show and hide controls and are a great way of organizing your controls on a page. The Section control has similar properties available to the Page control. ID and Label are, again, required and we have a check box to indicate the default state of the section. The Dependencies section enables us to show or hide prompts based on the values of another prompt (investigate the Dependencies tab for more information).

 

04_GR_2_sectionControl.png

 

Click the text under the Section control to view the properties of the Text control. The Text control is used to provide instructional text for the end user. Again, the ID property is required – which is a common property throughout the different controls.

 

05_GR_3_TextControl.png

 

Click the next control which has a label of Select the course table. This is an Input Table control and enables the end user to select the input table when executing the step. Again, the ID property is required but there are other optional properties so you can customize the control exactly how you would like it.

 

06_GR_4_InputTable.png

 

Before we move on to the Controls page, I want to point out the Data section in the Control Library and how many of the other controls there are highlighted on the Data page. Feel free to review the instructional text to investigate the other controls.

 

07_GR_5_DataControls.png

 

  1. What about the controls on the Controls page? Select Controls to see the properties for the Control page. The controls listed here are from the common control section in the Control Library. Let’s highlight a few:

Expand the Check box control section and select the Check box control. This is used to choose between two opposite states, actions or values.

 

08_GR_6_CheckBox.png

 

Expand the Date and time control section and select the control with the label Date. This is the Date and Time Picker control and enables the end user to choose- in this case- a Date from a calendar.

 

09_GR_7_DateTime.png

 

Expand the Numeric field controls and select the Numeric stepper control. You can use the numeric stepper to move through numbers at a specified increment by using the up and down arrows. You can state the default as well as minimum and maximum values.

 

10_GR_8_NumericStepper.png

 

  1. I also want to highlight that you can test the controls using the Sample controls custom step. Click Preview to view the controls in the user interface as a new tab.

On the Data page click 15_GR_DataOutput.png and choose SASHELP as the library and CARS as the table and click OK.

 

For Select a single column, click 16_GR_Add.png and choose Make. Notice, the columns have been listed from SASHELP.CARS. Click OK.

 

11_GR_9_Preview1.png

 

Click the Controls tab and expand the Date and time control section. Click 17_GR_Date.png on the Date control and choose any date.

 

Expand the Numeric field controls section and use the numeric stepper to choose 15 as the number.

 

12_GR_10_Preview2.png

 

 

Reduce and Reuse

 

So how can I reduce the initial setup and configuration time when using the Designer by reusing the controls within the Sample Controls custom step?

 

  1. Return to the Sample Controls.step tab and select Controls, if necessary.
  2. Expand the Drop-down list control and right-click the control labelled Static drop-down list.
  3. You have the ability to move this control up, down, to another section, or to another page. You can also duplicate, delete, cut, copy, or paste the control. Select Copy.

 

16_GR_11_RightClick-2.png

 

  1. Click New tab then select Custom step.
  2. Right-click on the workspace area, or canvas and select Paste.
  3. Select the control labelled Static drop-down list to view the properties that have been copied and pasted. You can then modify these properties if necessary!

 17_GR_12_CustomStep.png

 

Reduce and reuse!

 

Summary

 

There are so many valuable assets available when learning, using and creating SAS Custom Steps for SAS Studio.

 

To summarize:

 

  1. Use the Sample Controls custom step to learn about controls, as well as see them in action! This is particularly useful when understanding dependencies.
  2. Copy and paste controls from the Sample Controls custom step to reduce setup and configuration time when creating your custom steps.
  3. Learn more about SAS Custom Steps by attending the Developing Custom Steps using SAS Studio Analyst course.

 

 

Find more articles from SAS Global Enablement and Learning here.

  

 
Version history
Last update:
‎12-21-2023 02:02 AM
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags