# Field macros for associative array

**URL:** <https://verificationacademy.com/forums/t/field-macros-for-associative-array/42166>\
**Category:** UVM\
**Tags:** UVM, associative\_arrays, UVM-field-macros\
**Created:** [August 18, 2023, 10:14pm UTC](https://verificationacademy.com/forums/t/field-macros-for-associative-array/42166 "2023-08-18T22:14:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blitzz0418](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/8c91f0/32.png) [@Blitzz0418](https://verificationacademy.com/forums/u/Blitzz0418)\
**Post date:** [August 18, 2023, 10:14pm UTC](https://verificationacademy.com/forums/t/field-macros-for-associative-array/42166/1 "2023-08-18T22:14:05Z")

</div>

Hi  
i have associative array with key as int and value as int too. i would like to print it as key== decimal and value == hex  
any idea on how to do falg setting for key and value separately?  
thank you

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [August 19, 2023, 3:55pm UTC](https://verificationacademy.com/forums/t/field-macros-for-associative-array/42166/2 "2023-08-19T15:55:57Z")

</div>

_In reply to [Blitzz0418](https://verificationacademy.com/forums/t/field-macros-for-associative-array/42166):_

It is highly recommended to [not use the field macros](https://verificationacademy.com/cookbook/uvm/guidelines) and instead [implement the required transaction methods](https://verificationacademy.com/cookbook/transaction/methods) so you have control over how your transaction is displayed.
