BookmarkSubscribeRSS Feed

SAS Viya: Control Dependencies in a Custom Step

Started ‎12-06-2023 by
Modified ‎12-06-2023 by
Views 327

As of the Viya stable 2023.10 release there is another option for dependencies between controls – the Enablement dependency option.  Therefore, there are now two dependency options – Visibility and Enablement.  I will review both dependency options in this post.

 

1_MK_Enable.jpg

Select any image to see a larger version.

Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

Visibility versus Enablement

 

The Visibility dependency option is used to determine whether or not the control is displayed to the end user.  A control that uses the Enablement dependency option is always displayed and the dependency is used to determine whether or not the control is available for editing.

 

Example

 

Let’s look at a working example.  I downloaded the GeoDistance with Rounding custom step from the GitHub - sassoftware/sas-studio-custom-steps: Repository to share SAS Studio Custom Steps to illustrate the dependencies options.  For more information on how to do this, view this YouTube video.

 

I open the custom step in Designer mode and look at its Options tab to review the dependency options.

 

2_MK_Enable.jpg

 

Visibility

 

Currently, the Decimal places text or numeric control has the dependency for Visibility set.  If the Round checkbox control is checked, then the Decimal places text or numeric control will be displayed; otherwise, the Decimal places text or numeric control will not be displayed.  For more information on the expression syntax for dependencies, view its documentation.

 

3_MK_Enable.jpg

 

Let’s preview this.  With the Round checkbox control unchecked, the Decimal places text or numeric control is not displayed.

 

4_MK_Enable.jpg

 

When the Round checkbox control is checked, the Decimal places text or numeric control is displayed.

 

5_MK_Enable.jpg

 

Enablement

 

Now, let’s change so the dependency for the Decimal places text or numeric control uses the Enablement option instead.

 

6_MK_Enable.jpg

 

When the Round checkbox control is unchecked, the Decimal places text or numeric  control is displayed, but it is read-only (i.e., not enabled).

 

7_MK_Enable.jpg

 

When the Round checkbox control is checked, the Decimal places text or numeric is displayed and able to be edited (i.e., enabled).

 

8_MK_Enable.jpg

 

Summary

 

The new dependency feature, Enablement, gives you more design possibilities for your custom steps.   For more information on the new Enablement dependency review its documentation.

 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎12-06-2023 11:37 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