# Filter data table without Case sensitive values

**URL:** <https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365>\
**Category:** Help\
**Tags:** datatable, question, system, activities\
**Created:** [November 15, 2019, 11:01am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365 "2019-11-15T11:01:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikramgera](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vikramgera/32/176675_2.png) [@vikramgera](https://forum.uipath.com/u/vikramgera)\
**Post date:** [November 15, 2019, 11:01am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/1 "2019-11-15T11:01:15Z")

</div>

I have a table containing 4-5k rows with 9-10 columns. I just want to filter the table into another table. I am just getting the problem when any row is having value in different case which is other than filter criteria I have mentioned. for example - one column Status is having values  
‘Single’, ‘single’, ‘SINGLE’, ‘married’,‘Married’, MARRIED’ and another column Country is having values like ‘usa’, ‘USA’, ‘Usa’, ‘Australia’, ‘australia’, ‘AUSTRALIA’. So I would like to fetch the values who are Single or SINGLE or single and living in usa or USA or Usa.  
pls let me know how can i do that.

---

<div class="post-metadata">

**Author:** ![prakaz25](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prakaz25/32/109081_2.png) [@prakaz25](https://forum.uipath.com/u/prakaz25)\
**Post date:** [November 15, 2019, 11:09am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/2 "2019-11-15T11:09:27Z")

</div>

Hi @vikramgera

Welcome to our Community!

Convert the column as ToLower or To Upper then do your own logic

Ex  
dt.Columns[“ColumnName”].Caption = dt.Columns[“ColumnName”].Caption.ToLower();

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [November 16, 2019, 3:38am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/3 "2019-11-16T03:38:03Z")

</div>

@vikramgera

Welcome back to the uipath community.

1. First use **Read Range** Activity to read the data from excel file and will give you output as DataTable and say ‘inputDT’.

2. And set case sensitive to false for that DataTable like below.

3. And then use **Filter DataTable** Activity or select query to filter data from input data.

---

<div class="post-metadata">

**Author:** ![Palaniyappan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/palaniyappan/32/524095_2.png) [@Palaniyappan](https://forum.uipath.com/u/Palaniyappan)\
**Post date:** [November 16, 2019, 5:23am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/4 "2019-11-16T05:23:27Z")

</div>

Hi  
Welcome back to uipath community  
—we got two options to handle this  
—once after getting the datatable use OUTPUT DATATABLE Activity and lass the datatable as input and get the output with a variable of type string named out\_strdt  
—then use a assign activity like this  
**out\_strdt = out\_strdt.ToUpper**  
—now use a GENERATE DATATABLE activity and pass this string variable as input and get the output with a variable of type datatable named Finaldt  
—then we can use Filter Datatable activity and pass the input Finaldt and mention the filter condition value in all upper case  
Or

We can use For each row loop and pass the datatable as input  
—and change the specific column we are going to filter as a upper case like this

**row(“yourcolumnname”) = row(“yourcolumnname”).ToUpper**

And then apply filter datatable  
Cheers @vikramgera

---

<div class="post-metadata">

**Author:** ![vikramgera](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vikramgera/32/176675_2.png) [@vikramgera](https://forum.uipath.com/u/vikramgera)\
**Post date:** [November 18, 2019, 5:08am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/5 "2019-11-18T05:08:14Z")

</div>

Hi,  
thanks for your reply. However, Filter data table activity does not give the desirable result after assigning CaseSensitive property to False.

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [November 18, 2019, 5:12am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/6 "2019-11-18T05:12:44Z")

</div>

@vikramgera

Ok. Have you tried with Select Query or not ? I mentioned select query in my previous post. Please give it a try once.

---

<div class="post-metadata">

**Author:** ![vikramgera](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vikramgera/32/176675_2.png) [@vikramgera](https://forum.uipath.com/u/vikramgera)\
**Post date:** [November 18, 2019, 5:25am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/7 "2019-11-18T05:25:27Z")

</div>

Yes Select query works But I wanted to use Filter data table activity as there are many filter criteria for multiple output tables in my process. Anyways, thanks I will try to consider select query for all output tables

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [November 18, 2019, 5:42am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/8 "2019-11-18T05:42:22Z")

</div>

@vikramgera

Glad to help you. Happy Automation 😀

---

<div class="post-metadata">

**Author:** ![vikramgera](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vikramgera/32/176675_2.png) [@vikramgera](https://forum.uipath.com/u/vikramgera)\
**Post date:** [November 18, 2019, 6:50am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/9 "2019-11-18T06:50:54Z")

</div>

One more thing, If I have few Columns with same name like I have 2 columns with ‘Status’ column name then how can I apply select query with Column index.  
PS: I am fetching the excel data by removing check on Addheaders property in read range

---

<div class="post-metadata">

**Author:** ![lakshman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshman/32/523490_2.png) [@lakshman](https://forum.uipath.com/u/lakshman)\
**Post date:** [November 18, 2019, 7:30am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/10 "2019-11-18T07:30:00Z")

</div>

@vikramgera

Try like this:

```
  yourDT.Select("[Column-0] = 'value' AND [Column-1] = 'value'").CopyToDataTable

```

---

<div class="post-metadata">

**Author:** ![vikramgera](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vikramgera/32/176675_2.png) [@vikramgera](https://forum.uipath.com/u/vikramgera)\
**Post date:** [November 18, 2019, 8:49am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/11 "2019-11-18T08:49:04Z")

</div>

Yeah Thanks Man. Just little change, instead of [Column-0] and [Column-1], [Column0] and [Column1] will work. But many thanks.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [November 21, 2019, 8:50am UTC](https://forum.uipath.com/t/filter-data-table-without-case-sensitive-values/168365/12 "2019-11-21T08:50:42Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
