# Extra fields calculated don't work in list.php (only in card.php) in the product module

**URL:** <https://www.dolibarr.org/forum/t/extra-fields-calculated-dont-work-in-list-php-only-in-card-php-in-the-product-module/23286>\
**Category:** Developing for Dolibarr\
**Created:** [January 20, 2023, 12:32am UTC](https://www.dolibarr.org/forum/t/extra-fields-calculated-dont-work-in-list-php-only-in-card-php-in-the-product-module/23286 "2023-01-20T00:32:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Maquibo](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@Maquibo](https://www.dolibarr.org/forum/u/Maquibo)\
**Post date:** [January 20, 2023, 9:45am UTC](https://www.dolibarr.org/forum/t/extra-fields-calculated-dont-work-in-list-php-only-in-card-php-in-the-product-module/23286/3 "2023-01-20T09:45:59Z")

</div>

Thank you very much for your reply.

I have tried the following code but I get error 500:

(($reloadedobj = new Product($db)) && ($reloadedobj-\>fetch($obj-\>id ? $obj-\>id : ($obj-\>rowid ? $obj-\>rowid : $object-\>id)) \> 0)) ? $reloadedobj-\>id: 3

but testing with the Societe class with the same code, it works:

(($reloadedobj = new Societe($db)) && ($reloadedobj-\>fetch($obj-\>id ? $obj-\>id : ($obj-\>rowid ? $obj-\>rowid : $object-\>id)) \> 0)) ? $reloadedobj-\>id: 3

I don’t understand why. I am doing something wrong?  
Thanks!

---

_[View the full topic](https://www.dolibarr.org/forum/t/extra-fields-calculated-dont-work-in-list-php-only-in-card-php-in-the-product-module/23286)._
