Can we have list as dropdown in custom activity rather than enum?

Hi guys,

The way to display a dropdown is with an enum. Note that when you’re creating the property, do not use InArgument<MyEnum> as the type; just use MyEnum.

Now say you have an enum to define regions of the world that has ap_east, ap_south, ap_west, etc. The values have to be written in this ugly way with underscores instead of spaces because they’re technically keys. That doesn’t look too good in an activity though, so you can use this EnumNameConverter class to give each value a prettier label. Use it like so:

Your Enum class (mine is named Regions)
screenshot_76

The property in your activity
screenshot_75

The display in the properties panel
screenshot_77

EnumNameConverter.cs (1.7 KB)

8 Likes