Property Editor Basics: Specifying Editors

Last Updated: 03/28/2018 Introduced in Version: 2.0

Overview

You can change how property editors display in the tool. For example, a property editor that appears as a text box may be converted to a drop down menu. You can make these changes by decorating properties with property editor attributes.

Example

For this example we will write a step that has a property called Level for which you want to allow users to select from three levels. To do this, you would need to decorate your Level property with the following attribute:
If the Level property was not decorated with this attribute, it would show up in the designer looking like this:
2017-02-10_151204
 
After decorating, the property will show up in the designer looking like this:
2017-02-10_144225
 

The example above showed how to specify values by providing the attribute with a string array. You can also create another property which supplies the values to this attribute. This is useful when you want to dynamically fetch the possible values at design time. Below is an example showing how this can be done.

Here is how the property which is specified about might look:

The above example shows how to set a property editor on a property. You can also set a property editor on an input parameter to a simple method step. To do this, you simple place the editor attribute you want to use directly before the parameter name you want to apply it to. Notice how the  [PasswordTextAttribute] is applied to the  string password input parameter below.

Doing this will cause the password editor to show up when selecting a constant mapping type.

 
 

Additional Resources