=========
set_where
=========

.. js:function:: set_where(where)

**domain**: client 

**language**: javascript

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

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

Use the ``set_where`` method to define and store internally the ``where``
option that will be used by the 
:doc:`open <m_open>` 
method, when its own ``where`` option is not specified. The 
:doc:`open <m_open>` 
method clears internally stored parameter value. 

The ``where`` parameter is an object of key-value pairs, where keys are
field names, that are followed, after double underscore, by a filtering symbols
(see
:doc:`Filtering records </programming/data/filtering_records>`
).


Example
=======

The result of the execution of following code snippets wil be the same:

.. code-block:: js

    item.open({where: {id: 100}});

.. code-block:: js

    item.set_where({id: 100});
    item.open();
    
See also
========

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

:doc:`open <m_open>`