question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What happened?

Dataview is not finding files that match the criteria from the code.

I have YAML data that has a ‘project’ field and then this contains a project name ie:

project: [[project name here]]

This is the code I have:

TABLE file.cday AS Date, meeting_type AS Type, meeting_summary AS Summary WHERE contains(project, “project name here”) SORT Date ASC

It is finding some of the files, but not others. There is literally no difference in the case or wording in the files it is finding vs the ones it isn’t. I have no idea how to resolve this issue.

DQL

TABLE file.cday AS Date, meeting_type AS Type, meeting_summary AS Summary 
WHERE contains(project, "project name here")
SORT Date ASC

JS

No response

Dataview Version

0.5.47

Obsidian Version

0.15.9

OS

Windows

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
blacksmithgucommented, Oct 12, 2022

In this specific case, the issue is that links are not text and you can’t use contains on them - convert them to text first:

WHERE contains(string(project), "project name here"))
0reactions
AB1908commented, Oct 12, 2022

Similarly, you must use string(field) when doing the sort to sort correctly. You are running into type mismatches. You can also view the contents you’re querying by adding a string(key) to your query, in addition to key. You will notice that one has the appearance of a link while the other is a simple string.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Capture and read bug reports - Android Developers
A bug report contains device logs, stack traces, and other diagnostic information to help you find and fix bugs in your app.
Read more >
What Is A Bug Report? The Essential Guide + Examples Of ...
A bug report is something that stores all information needed to document, report and fix problems occurred in software or on a website....
Read more >
How to Write A Good Bug Report? Tips and Tricks
Bug reporting is an important aspect of Software Testing. Effective Bug reports communicate well with the development team to avoid confusion or ...
Read more >
14 Bug Reporting Templates You Can Copy for Your QA ...
Check out these 14 super actionable bug report templates, tailored for your issue tracker like Jira, GitHub, Trello, Asana, Excel and more.
Read more >
Bug Reporting - Apple Developer
Now with Feedback Assistant available on iPhone, iPad, Mac, and the web, it's easier to submit effective bug reports and request enhancements to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found