> For the complete documentation index, see [llms.txt](https://nosicode.gitbook.io/faq/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nosicode.gitbook.io/faq/intermediate/how-to-make-a-filter-search-with-queryinterface.md).

# How to make a filter/search with QueryInterface

## UI

Drag components and fields like this:

![](/files/-LBVXEwxDJLDqN0l7Tab)

## CODE

Inside your reserved code area, copy this:

```java
QueryInterface query = Core.query(Core.defaultConnection(),"SELECT id as id,email as email,name as name")
  .from("tbl_person");

if(Core.isNotNull(model.getEmail()))
 query.where("email=:email").addString("email", model.getEmail());
if(Core.isNotNull(model.getName()))
  query.where("name=:name").addString("name", model.getName());

model.loadTable_1(query);
```

Query List Row

```java
QueryInterface query = Core.query("conn_app_pg","SELECT id,name,email FROM public.persons");
ResultSet.Record o = query.getRecordList();
o.RowList.forEach(r->{
    System.out.println(r.getInt("id")+":"+r.getString("name")+":"+r.getString("email"));
});
```

Query Single Row

```java
QueryInterface query = Core.query("conn_app_pg","SELECT id,name,email FROM public.persons");
ResultSet.Record o = query.getSigleRecord();
System.out.println(o.getInt("id")+":"+o.getString("name")+":"+o.getString("email"));
```
