---
description: Use automatic data filters
---

# Showing Data in app - Filters

You can filter any app user data or actions they perform within your app. Once **Filter** is created it is updated automatically every 10 minutes OR as soon as the data pull request was sent.

Filters output the following data:

* Aggregated data (record count, max, min value)
* List of records which fall under Filter condition.

{% hint style="info" %}
**Each filter can be applied to events and users** (objects) - both at the same time. For example: we have a clickable button and we have a filter which tracks those button clicks. And we have two app users, each clicked the button twice. In the Objects section, this filter will show the count of **two** (two app users clicked the button). In the Events section, this filter will show the count of **four** (total number of button click events is four).
{% endhint %}

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### CREATE YOUR FIRST FILTER

1. Open **Demo App**
2. Create new screen by clicking **Add Screen** at the bottom of the screen
3. Go to **Objects** in the top menu

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/l0x27jbs28/1557852974228/image.png)

&#x20; 4\. Click **Add Filter** and then **Create Filter**

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/l0x27jbs28/1557219136058/ezgif-com-video-to-gif-1.gif)

&#x20;    5\. Name the filter as _AgeEmail_

&#x20;    6\. In **Conditions** section select **Email** as the searchable field from the first drop     down

&#x20;   7\. Select **Contains** and enter _gmail_, click on highlighted option when done

<div align="left"><img src="https://877328951-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlgISQGimMcecefzSf2%2F-LoVdUfM-yD1RpxySrCP%2F-LoVg0KmM1rgpL3d9fnY%2Ffilter.png?alt=media&#x26;token=76533181-443e-42ff-b602-4b4b8b5dad00" alt=""></div>

&#x20;  8\. Click **Save Changes** at the bottom of the screen.

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### DISPLAY FILTER RESULTS ON APP SCREEN

Now modify the logic of the created filter to show how many gmail users are less than specific age entered into another field.

1. Go to **Constructor** - click **Application** on the top and then **Constructor**
2. &#x20;Drag and drop [**Text Input**](../../../references/intro-placeholder/constructor_elements#text-input-and-text-area) element to the screen emulator
3. Set **Text Input** properties:
   * **Backendname** as _Age_
   * **Default Value** as _#Variable:ageVar#_

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/l0x27jbs28/1560139404203/screen-shot-2019-06-10-at-7-01-41-am.png)

&#x20;  4\. Drag and drop **Button** element

&#x20;  5\. Set **Caption Button** property to _Check Age #Backendname:Age#_

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/l0x27jbs28/1557853524184/screen-shot-2019-05-14-at-10-04-25-pm.png)

&#x20; 6\. Click **Actions,** open **Add new action** drop down, select **Set Variable**

&#x20; 7\. Set **Variable** properties:

* **Name** as _ageVar_
* **Value** as _#Backendname:Age#_

<div align="left"><img src="https://877328951-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LlgISQGimMcecefzSf2%2F-LpNzDrYj1mGRz9ZPLoy%2F-LpNzGz1VJr7bfQ90HxZ%2Fimage.png?alt=media&#x26;token=bb8dead9-05ff-427e-9dfc-87dfcac7fe62" alt=""></div>

&#x20; 8\. Click **Save**

&#x20;  9\. Click **Save Screen**

&#x20; 10\. Go to **Objects** section, click on your **AgeEmail** filter and choose **Edit** in the pop up menu

&#x20; 11\. Click **Plus** sign to add another condition - keep the logical condition to be **AND**

&#x20; 12\. In the first dropdown select **Age** column, change column type to numeric

&#x20; 13\. Set the comparison condition to be less than _#Variable:ageVar#_

&#x20; 14\. Click **Save changes**

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/l0x27jbs28/1557381928148/screen-shot-2019-05-09-at-10-54-56-am.png)

&#x20;  15\. Go back to **Constructor** and add **Text** element to the screen emulator (this element will show the result of filter count)

&#x20; 16\. Fill in **Text** properties with - _Number people with age below_ _**#Variable:age#**:_ _**#ObjectsFilter:AgeEmail:Count#**_

&#x20; 17\. Click **Save Screen.**

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### CHECK YOUR WORK

Click **Preview** to launch the app from the current screen to check it works.![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/l0x27jbs28/1557854049566/screen-shot-2019-05-14-at-10-13-39-pm.png)

We use [Hashtags](../../references/intro-placeholder/hashtags) functionality to reference Objects filter **AgeEmail** and call it's count - the number of records which fall under filter condition.

**#ObjectsFilter:AgeEmail:Count#**

{% hint style="info" %}
**Note:** You can also check how it was set up in **Demo App** in your acсount, screen - **8 Filters Count**.
{% endhint %}

####

#### MENTIONED ARTICLES

* [Constructor elements](../../references/intro-placeholder/constructor_elements)
* [Hashtags](../../references/intro-placeholder/hashtags)
* [Automate with triggers](automate_with_triggers)
* [Apply loops to screen elements](apply_loops_to_screen_elements)



#### RECOMMENDED ARTICLES

* [Smart filters](../../references/intro-placeholder/untitled-1)

