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

Hi @balupad14 @vvaidya @loginerror

In above post person has suggested enum for dropdown in custom activity. Can we have list instead of enum.
Thanks!

2 Likes

hello @Jan_Brian_Despi / @Lahiru.Fernando/ @Prakshi_Tyagi -
please assist here if you can provide any solution for above issue would be of great help

Thanks :slightly_smiling_face:

1 Like

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)

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.