# Search bar not appearing for 1 table

**URL:** https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946
**Category:** Help me!
**Created:** [March 5, 2025, 10:50am UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946 "2025-03-05T10:50:54Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![ed.sparks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ed.sparks/32/6552_2.png) [@ed.sparks](https://community.forestadmin.com/u/ed.sparks)
#### Post date: [March 5, 2025, 10:50am UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/1 "2025-03-05T10:50:54Z")

</div>

![Screenshot 2025-03-05 at 10.50.46](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/0/00949ea26ee0864ed07502d608cc1b8603b5d27b.png)

## Feature(s) impacted

Search functionality not working on 1 table only

## Observed behavior

Search bar should be there but it’s not

## Expected behavior

Search bar being there

## Context

- Project name: Ibex
- Team name:N/A
- Environment name: Production
- Agent technology: rails
- Agent (forest package) name & version: forest liana 8.1.0
- Database type: postgresql
- Recent changes made on your end if any: N/A

---

<div class="post-metadata">

### Author: ![anon7311026](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@anon7311026](https://community.forestadmin.com/u/anon7311026)
#### Post date: [March 5, 2025, 10:55am UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/2 "2025-03-05T10:55:46Z")

</div>

Hello @ed.sparks,

The global search bar should be shown unless it has been deactivated by a [customization](https://docs.forestadmin.com/developer-guide-agents-nodejs/agent-customization/search#disable-the-search), or if it is a smart collection, which is not searchable by default.

Did the search use to be working well for this collection at some point ? If so when did start to see that the bar disappear ? Does filtering work correctly ?

Please let me know on which collection does the problem occur 🙏

---

<div class="post-metadata">

### Author: ![ed.sparks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ed.sparks/32/6552_2.png) [@ed.sparks](https://community.forestadmin.com/u/ed.sparks)
#### Post date: [March 5, 2025, 10:58am UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/3 "2025-03-05T10:58:30Z")

</div>

Hi Nicolas,

It’s a normal collection with 1 smart action but we haven’t made any changes to it.

Where would we be able to turn it off. I haven’t been able to locate something like that?

---

<div class="post-metadata">

### Author: ![ed.sparks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ed.sparks/32/6552_2.png) [@ed.sparks](https://community.forestadmin.com/u/ed.sparks)
#### Post date: [March 5, 2025, 10:58am UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/4 "2025-03-05T10:58:56Z")

</div>

And yes, it’s been working for a few years and never been an issue.

---

<div class="post-metadata">

### Author: ![anon7311026](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@anon7311026](https://community.forestadmin.com/u/anon7311026)
#### Post date: [March 5, 2025, 11:04am UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/5 "2025-03-05T11:04:05Z")

</div>

what is the collection name please ?

---

<div class="post-metadata">

### Author: ![anon7311026](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@anon7311026](https://community.forestadmin.com/u/anon7311026)
#### Post date: [March 5, 2025, 11:05am UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/6 "2025-03-05T11:05:57Z")

</div>

I have found 1 collection that is not searchable in your api schema, the collection “Campaign”. Is that the one ?

---

<div class="post-metadata">

### Author: ![ed.sparks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ed.sparks/32/6552_2.png) [@ed.sparks](https://community.forestadmin.com/u/ed.sparks)
#### Post date: [March 5, 2025, 11:34am UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/7 "2025-03-05T11:34:01Z")

</div>

Hi Nicolas,

Yes, that is the table. But we haven’t made any changes on our side that would have affected that to my knowledge.

---

<div class="post-metadata">

### Author: ![anon7311026](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@anon7311026](https://community.forestadmin.com/u/anon7311026)
#### Post date: [March 5, 2025, 12:29pm UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/8 "2025-03-05T12:29:54Z")

</div>

Ok. Indeed, looking through your apimap versions (since 09/09/2024), it has always been this way.  
Maybe we fixed a bug which previously let the search bar appear on frontend in this case, but I’m not aware of any.

In any case, you will have to update your agent schema or customization to try and enable search on this collection, since it is the expected behaviour from frontend side.

---

<div class="post-metadata">

### Author: ![ed.sparks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ed.sparks/32/6552_2.png) [@ed.sparks](https://community.forestadmin.com/u/ed.sparks)
#### Post date: [March 5, 2025, 12:40pm UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/9 "2025-03-05T12:40:38Z")

</div>

Hi Nicolas,

Thank you for finding this.

We haven’t got anywhere in our codebase where we have deactivated the search.

The only addition we have made to this table is we created a new field in the collection as Forest Admin would not display one of our fields correctly and I spent time with the support team on a call writing the workaround. Which is here

```ruby
class ForestLiana::Collections::Campaign
  include ForestLiana::Collection

  collection :Campaign

  search_code =
    lambda do |query, search|
      ​
      # Injects your new filter into the WHERE clause.
      query.where_clause.send(:predicates)[0] << " OR (campaign_id = '#{search}')"
      query
    end

  set_code =
    lambda do |user_params, code|
      user_params[:campaign_id] = code
      user_params
    end

  field :campaign_code, type: 'String', search: search_code, set: set_code do
    object.campaign_id
  end

  action 'Import Campaign'
end

```

Outside of this, there is a smart action “Import Campaign”

```ruby
class Forest::CampaignsController < ForestLiana::SmartActionsController

  # Smart Action for importing campaigns directly from the Forest Admin dashboard
  # This action is triggered when the user clicks on the "Import Campaign" button
  def import_campaign
    campaign_id = ForestLiana::ResourcesGetter.get_ids_from_request(params, forest_user).first

    user = User.find_by(email: forest_user['email'])

    Campaign.find(campaign_id).init_import(user) if user

    head(:no_content)
  end
end

```

Outside of this, where would I re-enable the search functionality or override the schema?

---

<div class="post-metadata">

### Author: ![anon21153075](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@anon21153075](https://community.forestadmin.com/u/anon21153075)
#### Post date: [March 5, 2025, 1:40pm UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/10 "2025-03-05T13:40:44Z")

</div>

Hello @ed.sparks,

I have reproduced the problem on my side.

You can add the `is_searchable: true` option to force the collection to be searchable, as shown below:

```javascript
class ForestLiana::Collections::Campaign
  include ForestLiana::Collection

  collection :Campaign, is_searchable: true

```

---

<div class="post-metadata">

### Author: ![anon7311026](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@anon7311026](https://community.forestadmin.com/u/anon7311026)
#### Post date: [March 5, 2025, 2:28pm UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/11 "2025-03-05T14:28:49Z")

</div>

> [@anon7311026](#):
>
> Maybe we fixed a bug which previously let the search bar appear on frontend in this case, but I’m not aware of any.

I have been told that indeed, we fixed a bug with the search bar recently. Sorry for the inconvenience caused 🙏

---

<div class="post-metadata">

### Author: ![ed.sparks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ed.sparks/32/6552_2.png) [@ed.sparks](https://community.forestadmin.com/u/ed.sparks)
#### Post date: [March 5, 2025, 3:20pm UTC](https://community.forestadmin.com/t/search-bar-not-appearing-for-1-table/7946/12 "2025-03-05T15:20:27Z")

</div>

> [@anon21153075](#):
>
> `, is_searchable: true`

Thank you for looking into this Nicolas.

I’all add the change now.

Many thanks

Ed
