# Smart Field Reference Typeahead

**URL:** <https://community.forestadmin.com/t/smart-field-reference-typeahead/3792>\
**Category:** Help me!\
**Created:** [November 29, 2021, 12:27pm UTC](https://community.forestadmin.com/t/smart-field-reference-typeahead/3792 "2021-11-29T12:27:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arda\_Yurdakul](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arda_yurdakul/32/2334_2.png) [@Arda\_Yurdakul](https://community.forestadmin.com/u/Arda_Yurdakul)\
**Post date:** [November 29, 2021, 12:27pm UTC](https://community.forestadmin.com/t/smart-field-reference-typeahead/3792/1 "2021-11-29T12:27:39Z")

</div>

Hey Forest,

Here’s what I’m trying to do: I have a smart field that I’m using as a reference field on a collection. However I can’t really use the typeahead, the only field that seems to work is the id. I basically want to be able to search this smart field that I’m returning on the typeahead. So essentially someone could type out the id or the product name, etc. and it should pop up. Here’s how it currently is.

Thank you in advance!

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/9/9e5d7977d06ffc1747891c05fe4ed7f2d4804e94.png)

![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/1/1fbf299870674545f1e620552681adb565cf27ac.png)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/e/e5d5199f20f1ce76803e411880f665ff037ddac6.png)

---

<div class="post-metadata">

**Author:** ![anon23361380](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@anon23361380](https://community.forestadmin.com/u/anon23361380)\
**Post date:** [November 29, 2021, 1:08pm UTC](https://community.forestadmin.com/t/smart-field-reference-typeahead/3792/2 "2021-11-29T13:08:16Z")

</div>

Hello @Arda_Yurdakul ,

Can you try to search on fields separately? Here’s an [example](https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields#searching-sorting-and-filtering-on-a-smart-field) that you can find in our documentation.

Please let me know if this helps!

---

<div class="post-metadata">

**Author:** ![Arda\_Yurdakul](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arda_yurdakul/32/2334_2.png) [@Arda\_Yurdakul](https://community.forestadmin.com/u/Arda_Yurdakul)\
**Post date:** [November 29, 2021, 2:14pm UTC](https://community.forestadmin.com/t/smart-field-reference-typeahead/3792/3 "2021-11-29T14:14:31Z")

</div>

Hey @anon23361380,

Thank you for the fast reply! The logic is working, however I mainly need to use some related data for search. Namely, I need to be able to search on product name which is related to the collection the smart field is on(productPrices) with 1:n. Below you can see how I get said data to put on the smart field value. How can I pull that related data within the search query?

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/9/9a8e12674e19a782780e1e9dff44df9c0b4a9cc3.png)

---

<div class="post-metadata">

**Author:** ![anon23361380](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@anon23361380](https://community.forestadmin.com/u/anon23361380)\
**Post date:** [November 29, 2021, 2:35pm UTC](https://community.forestadmin.com/t/smart-field-reference-typeahead/3792/4 "2021-11-29T14:35:50Z")

</div>

Do you have the possibility to click on `Try an extended search` as mentioned in the [documentation](https://docs.forestadmin.com/woodshop/how-tos/how-to-search-on-belongsto-relationship-fields-by-default)? (Don’t forget to modify the routes as well as stated in the example.)

---

<div class="post-metadata">

**Author:** ![Arda\_Yurdakul](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arda_yurdakul/32/2334_2.png) [@Arda\_Yurdakul](https://community.forestadmin.com/u/Arda_Yurdakul)\
**Post date:** [November 30, 2021, 8:46am UTC](https://community.forestadmin.com/t/smart-field-reference-typeahead/3792/5 "2021-11-30T08:46:36Z")

</div>

@anon23361380 This didn’t seem to work for the typeahead, another solution for my case could be changing the widget from a typeahead to a dropdown. Is this possible on a smart action form field?

---

<div class="post-metadata">

**Author:** ![anon79585656](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@anon79585656](https://community.forestadmin.com/u/anon79585656)\
**Post date:** [December 1, 2021, 11:12am UTC](https://community.forestadmin.com/t/smart-field-reference-typeahead/3792/6 "2021-12-01T11:12:24Z")

</div>

Hello @Arda_Yurdakul

I’m sorry but after looking into it, searching on related data as you want to do it is not supported at the time.

I’ll share this need with the team and try to have it added on our roadmap.

Regarding the dropdown solution, it may help but not entirely.  
Please have a look at this documentation page: [https://docs.forestadmin.com/documentation/reference-guide/fields/customize-your-fields/edit-widgets#dropdown](https://docs.forestadmin.com/documentation/reference-guide/fields/customize-your-fields/edit-widgets#dropdown)

Look for “dynamic mode”, and “enable search”. This may help.  
Please that in your case, you might need to fetch the whole product table to generate all possible values.
