======
search
======

.. js:function:: search(field_name, value, search_type, callback) 

**domain**: client 

**language**: javascript

**class** :doc:`Item class </refs/client/item_api>`

Description
===========

Call ``search`` to send to the server a request to generate and execute 
an sql query to get all records which satisfy the search condition for the field. 
The query will also satisfy currently set filteres or where condition for an item. 
The existing visual controls will be update with the returned dataset.

Parameters:

* ``field_name`` - name of the field

* ``value`` - value of the condition

* ``search_type`` - type of search as a string, see Filter symbol in 
  :doc:`Filtering records </programming/data/filtering_records>`

* ``callback`` - a callback function that will be executed after search is 
  executed
  
See also
========

:doc:`Dataset </programming/data/dataset>`

:doc:`Filtering records </programming/data/filtering_records>`

