# How to Filter Data Based on User Given Input?

**URL:** https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668
**Category:** Ask for Help
**Created:** [July 3, 2021, 2:31pm UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668 "2021-07-03T14:31:17Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Sudipta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sudipta/32/28585_2.png) [@Sudipta](https://community.glideapps.com/u/Sudipta)
#### Post date: [July 3, 2021, 2:31pm UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/1 "2021-07-03T14:31:17Z")

</div>

Dear Friends,

I need some help Can you guys help to find the particular data based on User Input?

- User Will Enter (Run time) Phone Number and Password
- Based on Phone Number and Password Combination ( Name and other data will show from database/google sheet )
- If Not found then will show message " Phone Number and Password Wrong "

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [July 3, 2021, 2:37pm UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/2 "2021-07-03T14:37:30Z")

</div>

The general approach to this is:

- Store your input in User Specific columns
- Create a template that combines the two provided values
- Create a similar template joining the two associated values in your data
- Create a relation joining those two templates
- Retrieve whatever values you need through the relation

If any of the above concepts are unfamiliar, here is some recommended reading/viewing:

- [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns)
- [Template Columns](https://docs.glideapps.com/all/reference/data-editor/computed-columns/template-column)
- [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column)

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [July 4, 2021, 3:37am UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/3 "2021-07-04T03:37:43Z")

</div>

I feel obligated to mention that creating your own methods of signing users into the app is not secure. Anybody would be able to view the phone numbers and passwords of any other user with some minor digging through the data.

---

<div class="post-metadata">

### Author: ![Sudipta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sudipta/32/28585_2.png) [@Sudipta](https://community.glideapps.com/u/Sudipta)
#### Post date: [July 4, 2021, 2:13pm UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/4 "2021-07-04T14:13:13Z")

</div>

Thank you for your suggestion 🙏  
Can the User Login via Phone Number instead of Email Id?

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [July 4, 2021, 2:27pm UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/5 "2021-07-04T14:27:30Z")

</div>

RE login with phone number… at the moment no.

---

<div class="post-metadata">

### Author: ![jnthnn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jnthnn/32/43423_2.png) [@jnthnn](https://community.glideapps.com/u/jnthnn)
#### Post date: [June 3, 2022, 8:41am UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/6 "2022-06-03T08:41:49Z")

</div>

I just got the same problem, and a little bit confused about your third point.

> [@Darren\_Murphy](#):
>
> Create a similar template joining the two associated values in your data

let me make it clear, did you mean this template column should joining all data like Name and other data?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [June 3, 2022, 8:59am UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/7 "2022-06-03T08:59:07Z")

</div>

The idea is to create a column in each table that can be used to link the two tables, and at the same time filter according to some criteria.

So going back to the original example, the OP wanted to match two values - Phone Number and Password. Presumably he had a sheet with a list of phone numbers and associated passwords. So he could create a template column in that table that joins those two values together.

In the user interface, he would have two input components to capture a user supplied phone number and password. Each of those would write the supplied values in to two separate user specific columns. He could then create a 2nd template column that would join the two column values.

And then it’s just a matter of creating a relation between the 2 template columns - if the relation is not empty, then a match is found.

Note that in the real world, I would never recommend trying to do this with user supplied phone numbers, because there are so many different ways that a phone number could be formatted, so the chances of finding a match would be low.

---

<div class="post-metadata">

### Author: ![jnthnn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jnthnn/32/43423_2.png) [@jnthnn](https://community.glideapps.com/u/jnthnn)
#### Post date: [June 3, 2022, 10:24am UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/8 "2022-06-03T10:24:00Z")

</div>

I begin to understand with your point.

> [@Darren\_Murphy](#):
>
> Note that in the real world, I would never recommend trying to do this with user supplied phone numbers, because there are so many different ways that a phone number could be formatted, so the chances of finding a match would be low.

thank you for your suggestion, but in my case I have to do this even this method probably doesn’t effective.

another question, how can I get user input (form) in a user specific column? since I tried but in form editor I cannot make it to user specific column, and I have read other topics that have the same problem about user specific column from user input form. any suggestions for this problem? thank you!

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [June 3, 2022, 10:27am UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/9 "2022-06-03T10:27:45Z")

</div>

> [@jnthnn](#):
>
> another question, how can I get user input (form) in a user specific column? since I tried but in form editor I cannot make it to user specific column, and I have read other topics that have the same problem about user specific column from user input form. any suggestions for this problem? thank you!

Yes, you would need a Custom Form.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…

Can you describe in a little more detail exactly what it is you’re wanting to do? There is probably an easier way to get what you want.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 3, 2022, 11:34pm UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/10 "2022-06-03T23:34:55Z")

</div>

> [@Darren\_Murphy](#):
>
> Note that in the real world, I would never recommend trying to do this with user supplied phone numbers, because there are so many different ways that a phone number could be formatted, so the chances of finding a match would be low.

What I would do is to use an API to return an internationally formatted number. That way you can make sure it’s a valid number, and it’s well-formatted.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/7/a7966fda4f2e1d1d4dbc9e047e99cb4bc6c947cc.jpeg)

Disclaimer: I’m using a random phone number from [https://www.randomphonenumbers.com/](https://www.randomphonenumbers.com/).

The API in question:

> **[Phone Validation API - Neutrino API Docs](https://www.neutrinoapi.com/api/phone-validate/)**
>
> Phone number validation and geolocation API - Verify and get useful information from a phone number like number type, number location and formatting options

Capped at 50 per day and 10000 per month on free tier.

---

<div class="post-metadata">

### Author: ![jnthnn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jnthnn/32/43423_2.png) [@jnthnn](https://community.glideapps.com/u/jnthnn)
#### Post date: [June 6, 2022, 7:23am UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/11 "2022-06-06T07:23:56Z")

</div>

actually i want to create such a login method, where user input an ID and their occupataion. the data will showed to them is the data related to that pair of ID-occupation only.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [June 6, 2022, 7:28am UTC](https://community.glideapps.com/t/how-to-filter-data-based-on-user-given-input/28668/12 "2022-06-06T07:28:37Z")

</div>

Glide doesn’t natively support this type of login method. You could try to create it yourself, but that’s not recommended and if you manage to succeed it won’t be secure.

A better approach would be to use a [standard authentication method](https://docs.glideapps.com/all/topics/security-and-user-data/controlling-who-can-access-your-app), and then ask people to select their occupation from a list, then filter according to their selection.
