# Is there any way to read dynamically the fields of data types / templates?

**URL:** <https://forum.canton.network/t/is-there-any-way-to-read-dynamically-the-fields-of-data-types-templates/7348>\
**Category:** App Development\
**Tags:** daml\
**Created:** [August 14, 2024, 5:19am UTC](https://forum.canton.network/t/is-there-any-way-to-read-dynamically-the-fields-of-data-types-templates/7348 "2024-08-14T05:19:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cohen.avraham](https://avatars.discourse-cdn.com/v4/letter/c/a87d85/32.png) [@cohen.avraham](https://forum.canton.network/u/cohen.avraham)\
**Post date:** [August 14, 2024, 5:19am UTC](https://forum.canton.network/t/is-there-any-way-to-read-dynamically-the-fields-of-data-types-templates/7348/1 "2024-08-14T05:19:30Z")

</div>

G-d willing

Hello,  
I would like to know how to write a generic function that accepts a data type and prints out the fields’ names and their types.  
How can I do this?

Thanks

---

<div class="post-metadata">

**Author:** ![bernhard](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bernhard/32/356_2.png) [@bernhard](https://forum.canton.network/u/bernhard)\
**Post date:** [August 19, 2024, 10:48am UTC](https://forum.canton.network/t/is-there-any-way-to-read-dynamically-the-fields-of-data-types-templates/7348/2 "2024-08-19T10:48:42Z")

</div>

Hi @cohen.avraham , Daml does not have reflection features of this kind. Even getting the human readable type name of a value is supported only in “dev” versions and for interfaces. See [How to get the name of a template or data type](https://discuss.daml.com/t/how-to-get-the-name-of-a-template-or-data-type/7314).
