Dataview js with regexmatch?

Things I have tried

I did try searching on the forum and google. Nothing seems to answer my needs at the moment.

Tried with dataview but it won’t pull the file name as subheader.

TASK
FROM "2.BUSINESS"
WHERE 
	regexmatch("tasks$", file.name)

What I’m trying to do

Using dataviewjs to retrieve tasks from pages ending with “tasks$” in regex. So far, the documentation only gives on guidance on retrieving based on file location or tags.

	dv.taskList(dv.pages(<need help here>).file.tasks.where(t => !t.completed)); 

Thanks in advance!

If you want a DQL query grouped by files (as the default output in dv.taskList), then you need to group tasks by file.link:

TASK
FROM "2.BUSINESS"
WHERE regexmatch("tasks$", file.name)
GROUP BY file.link
1 Like

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