Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Switch component

Updated on November 10, 2021

The Switch component lets you use conditional logic to execute automation events. For example, use this Switch to trigger specific events based on the index of the toolbar button selected.

Note: A Switch statement can only work with input types that can be edited, such as strings, integers, enumerations (like BorderStyle). For example, connecting the SelectedItem property from a list box to the input of a Switch fails because the SelectedItem property is an Object type and has no editor.

Properties

PropertyDescription
InputSupplies the value used in the comparison and evaluation of the cases.
SensitiveCheck the box to hide this component's values in logs and the Automation Surface.

Events

EventDescription
CasesAn event is created for each case that you define for the switch. To add a case, click the plus sign on the design block. Type a value or string to which you want to compare the input. The case that matches the input is fired when the Execute method is triggered. If none of the cases match the input, the default event fires.
DefaultThis event fires when none of the cases match the input.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us