# How to catch on forest server if a value is changed on forestAdmin?

**URL:** <https://community.forestadmin.com/t/how-to-catch-on-forest-server-if-a-value-is-changed-on-forestadmin/4749>\
**Category:** Help me!\
**Tags:** howtos\
**Created:** [June 2, 2022, 1:12pm UTC](https://community.forestadmin.com/t/how-to-catch-on-forest-server-if-a-value-is-changed-on-forestadmin/4749 "2022-06-02T13:12:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aarbel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/aarbel/32/3517_2.png) [@Aarbel](https://community.forestadmin.com/u/Aarbel)\
**Post date:** [June 2, 2022, 1:12pm UTC](https://community.forestadmin.com/t/how-to-catch-on-forest-server-if-a-value-is-changed-on-forestadmin/4749/1 "2022-06-02T13:12:05Z")

</div>

Hi ForestAdmin team,

Without using smart actions, is there a way to catch a database value change performed by ForestAdmin directly on the forest server ?

For example the Forest user “[toto@kontoso.co](mailto:toto@kontoso.co)” changed the field “firstName” in the collection “users” on ForestAdmin, we want to catch this chnage on our forest server and then perform side effects.

Our goal is mainly to send the new data to Segment if a data value is changed on ForestAdmin.

Thanks a lot for your help

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [June 2, 2022, 1:21pm UTC](https://community.forestadmin.com/t/how-to-catch-on-forest-server-if-a-value-is-changed-on-forestadmin/4749/2 "2022-06-02T13:21:00Z")

</div>

Hello @Aarbel,

There are 2 ways of doing this:

1. Override the route `PUT /users/:recordId` [described here](https://docs.forestadmin.com/documentation/reference-guide/routes/default-routes#update-a-record), and add some logic before or after the modification.
2. Define hooks on your ORM, to apply modifications before saving objects
  - For Mongoose, you can define [middlewares/hooks](https://mongoosejs.com/docs/middleware.html) on your schema
  - For Sequelize, you can [use hooks](https://sequelize.org/docs/v6/other-topics/hooks)

---

<div class="post-metadata">

**Author:** ![Aarbel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/aarbel/32/3517_2.png) [@Aarbel](https://community.forestadmin.com/u/Aarbel)\
**Post date:** [June 3, 2022, 3:40pm UTC](https://community.forestadmin.com/t/how-to-catch-on-forest-server-if-a-value-is-changed-on-forestadmin/4749/4 "2022-06-03T15:40:58Z")

</div>

Thanks a lot @GuillaumeGautreau for the speed of your feedback !

We use Prisma and PostgreSQL. I have in mind that Forest has a particular proximity with PostgreSQL. Do you provide deeper api connection with this kind of database ?

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [June 7, 2022, 6:47am UTC](https://community.forestadmin.com/t/how-to-catch-on-forest-server-if-a-value-is-changed-on-forestadmin/4749/5 "2022-06-07T06:47:29Z")

</div>

Hello,

What do you mean by deeper api connection?

Postgresql is supported through sequelize, and we don’t use anything fancy outside what is provided by sequelize.
