How to add strings in Type ENUM

I wanted to add strings in type ENUm. How can I do that?

Hi @nikhilreddy, could you provide an example of what you are trying to acheve?

In Daml, an enum is a variant where all constructors have no arguments, e.g.,

data X = A | B

Given that the cannot have arguments you cannot store strings in there. However, you can use a variant instead which can have arguments

data X = A Text | B Text
1 Like