# How to show an message if product is not found after search

**URL:** <https://forum.ionicframework.com/t/how-to-show-an-message-if-product-is-not-found-after-search/159152>\
**Category:** ionic-v3\
**Created:** [March 15, 2019, 5:57am UTC](https://forum.ionicframework.com/t/how-to-show-an-message-if-product-is-not-found-after-search/159152 "2019-03-15T05:57:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flycoders\_sourav](https://avatars.discourse-cdn.com/v4/letter/f/e47c2d/32.png) [@flycoders\_sourav](https://forum.ionicframework.com/u/flycoders_sourav)\
**Post date:** [March 15, 2019, 5:57am UTC](https://forum.ionicframework.com/t/how-to-show-an-message-if-product-is-not-found-after-search/159152/1 "2019-03-15T05:57:27Z")

</div>

How to show an message if product is not found after searh  
below my code

```auto
getItems(ev) {
  // Reset items back to all of the items
  this.initializeItems();
console.log(ev);
  // set val to the value of the ev target
  var val = ev.target.value;
  console.log(val)
  // if the value is an empty string don't filter the items
  if (val && val.trim() != '') {
    this.serarchProduct = this.serarchProduct.filter((item) => {
      return (item.product_name.toLowerCase().indexOf(val.toLowerCase()) > -1);
    })
  }
}

```

Please help me out  
any help would be highly appreciated  
Thanks
