Create an optional datatype from a normal one
- Divyansh_Gupta_ATR10OP
I want to convert a data type into an optional Data type. I tried the following format:
let newOptionalAdminId = Optional newAdminIdHowever, I am getting the following error with this
Data constructor not in scope: Optional : TalentId -> Optional TalentIdTalentId is the contract ID for the Template Talent. How can I convert this into an optional datatype?
- cocreature
The constructor for this is called
Some, solet newOptionalAdminId = Some newAdminIdOptional is just the name of the type.
You might also be interested in the tutorial on Daml data types Data Types — Daml SDK 2.8.0 documentation and the docs for Optional Prelude — Daml SDK 2.8.0 documentation