# Data type inside list in a template

**URL:** <https://forum.canton.network/t/data-type-inside-list-in-a-template/4922>\
**Category:** App Development\
**Created:** [July 17, 2022, 11:14pm UTC](https://forum.canton.network/t/data-type-inside-list-in-a-template/4922 "2022-07-17T23:14:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joao\_santos](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@joao\_santos](https://forum.canton.network/u/joao_santos)\
**Post date:** [July 17, 2022, 11:14pm UTC](https://forum.canton.network/t/data-type-inside-list-in-a-template/4922/1 "2022-07-17T23:14:43Z")

</div>

Hello.

I am struggling to understand why can I not create a list of courses inside my template as an attribute.  
 ![Screenshot 2022-07-18 at 00.13.51](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/f/fbaf8bfb44b58bd72ab2ceb2a63119b91f39b317.png)

 ![Screenshot 2022-07-18 at 00.14.23](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/5/5774b16302d5f46ab6e4288dc123de691f106862.png)

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [July 18, 2022, 6:53am UTC](https://forum.canton.network/t/data-type-inside-list-in-a-template/4922/2 "2022-07-18T06:53:24Z")

</div>

Hi @joao_santos and welcome to the forum!

Can you share a bit more of your code? I suspect the error isn’t quite in the lines you showed. I tried compiling the following locally and it works without any issues on SDK 2.3:

```haskell
module Main where

data Course = Course
  with
    subject : Decimal
    price : Decimal
  deriving (Show, Eq)

template Exlainer
  with
    name : Party
    courses : [Course]
  where
    signatory name

```

---

<div class="post-metadata">

**Author:** ![Stephen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephen/32/102_2.png) [@Stephen](https://forum.canton.network/u/Stephen)\
**Post date:** [July 18, 2022, 3:46pm UTC](https://forum.canton.network/t/data-type-inside-list-in-a-template/4922/3 "2022-07-18T15:46:43Z")

</div>

Additionally, in general on this forum, please share code and error messages as text instead of screenshots using ``` above and below, as explained [in this post](https://discuss.daml.com/t/how-to-ask-questions/304).

---

<div class="post-metadata">

**Author:** ![joao\_santos](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@joao\_santos](https://forum.canton.network/u/joao_santos)\
**Post date:** [July 18, 2022, 11:06pm UTC](https://forum.canton.network/t/data-type-inside-list-in-a-template/4922/4 "2022-07-18T23:06:04Z")

</div>

I figured out what the error was.

In the respective choice I was doing:

let courses = delete courses parameter

And it was not possible

---

<div class="post-metadata">

**Author:** ![joao\_santos](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@joao\_santos](https://forum.canton.network/u/joao_santos)\
**Post date:** [July 18, 2022, 11:06pm UTC](https://forum.canton.network/t/data-type-inside-list-in-a-template/4922/5 "2022-07-18T23:06:27Z")

</div>

Thank you! Will do it next time
