How to support case insensitivity in dataview task queries?

I use a query like

dv.taskList(dv.pages().file.tasks.where(t => !t.completed && t.text.includes("Free")));

How would I make it so “Free” or “free” both are matched? I saw that there is a lower() function in Dataview but I get Evaluation Error: ReferenceError: lower is not defined When I try to use it like

dv.taskList(dv.pages().file.tasks.where(t => !t.completed && lower(t.text).includes("free")));
1 Like

Hi @gekitsuu,

Because you’re using DataviewJS, you have to use the JavaScript function toLowerCase(), not the Dataview function lower().

```dataviewjs
dv.taskList(dv.pages().file.tasks
	.where(t => 
        !t.completed && 
         t.text.toLowerCase().includes("free")));
```
2 Likes

Thanks!

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