# Smart action field with "optional" reference

**URL:** <https://community.forestadmin.com/t/smart-action-field-with-optional-reference/1485>\
**Category:** Help me!\
**Tags:** howtos\
**Created:** [December 17, 2020, 5:00pm UTC](https://community.forestadmin.com/t/smart-action-field-with-optional-reference/1485 "2020-12-17T17:00:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cberez](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/cberez/32/511_2.png) [@cberez](https://community.forestadmin.com/u/cberez)\
**Post date:** [December 17, 2020, 5:00pm UTC](https://community.forestadmin.com/t/smart-action-field-with-optional-reference/1485/1 "2020-12-17T17:00:04Z")

</div>

We have a smart action used to create a new subscription for our product users, whenever a new or existing user needs a new subscription our operational team use it.

The field asks for an email to associate to the subscription. Up until now there was no validation on it, we want to add a visual info to the forest user stating if the email exists in database.

I tried first adding a `reference` on the `email` field of our smart action but if the email does not exist in DB the submitted value is empty.

So I looked at the `change` hook to which I associated a custom POST route and I am able to do my check server side, it works but then I have no way of notifying the forest user if the email is found or not.

Is there a way I could do that? Or maybe an optional reference on the field?

## Context

Please provide any relevant information about your setup.

- Package Version: 6.6.2
- Express Version: 4.17.1
- Sequelize Version: 5.19.6
- Project Name: Platform

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [December 18, 2020, 11:18am UTC](https://community.forestadmin.com/t/smart-action-field-with-optional-reference/1485/2 "2020-12-18T11:18:34Z")

</div>

HI @cberez and welcome in our community 🍾 !

A solution could be to simply set the description in the change hook `fields.city.description = '🌳 email found 🌳'`  
I hope this help you 🙏

---

<div class="post-metadata">

**Author:** ![cberez](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/cberez/32/511_2.png) [@cberez](https://community.forestadmin.com/u/cberez)\
**Post date:** [December 18, 2020, 1:25pm UTC](https://community.forestadmin.com/t/smart-action-field-with-optional-reference/1485/3 "2020-12-18T13:25:39Z")

</div>

Hi @anon62739609,  
I was thinking about it in a last resort, is there any other way? I’ll do that for now  
Thank you!
