Sergei Eensalu
Sergei Eensalu

Reputation: 386

How can i match and filter table by user input in data studio

I have a list of objects. In my case, the object is a contract (agreement). The contract has address field as string

I want to make it possible to filter by address. Or rather, the user enters the beginning or part of the address and the table is filtered based on the user input text. The problem is that the user can enter with a capital or small letter or something else, and thus strict equality does not work. I need a matching address with user input.

Data structure:

enter image description here

Input box controller:

enter image description here

This input box controller works only then user put exactly the same address as in data structure, for example Juhkentali tn 32, Tallinn. But my idea is, that user can enter only juhkentali and will see all contract with matched address

Please help me, how I could solve this problem.

Upvotes: 3

Views: 969

Answers (1)

Minesh Barot
Minesh Barot

Reputation: 97

I was facing the same issue. So I converted it to lower case using the lower function as commonly all searches are in lower case.

For example - My data had a patient name column with the following values

Wagner, ROBBINS, doe, junioR

So I converted the patient name column to lower case and used it in the input box. And, my visualizations used the original patient name column. The only restriction with this is that the users have to search only in lower case.

Please let me know if this helps or if you got a better solution.

Upvotes: 2

Related Questions