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.

Query backlinks to a specific file & sorting the results by creation date

See original GitHub issue

I have a file that’s linked to in many places. I want to create a query that shows me all files that links to this file & sort them by the files creation date.

```dataview
LIST file.inlinks FROM [[link]] or "#tag" or "#tag2" or "#tag3" WHERE !regexmatch("^notthisfilename$", file.name) SORT file.ctime ASC
```

This does return a list of files that backlinks to this file but they are not sorted by their creation date (I assume that file.ctime here referes to the file itself & not to the results) so I was wondering what am I doing wrong here & how can I do that if possible

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
blacksmithgucommented, Jul 23, 2021

Also, you can use WHERE this.file.name != file.name instead of a regexmatch.

1reaction
blacksmithgucommented, Jul 23, 2021

That query should be fine (i.e., sorting on file.ctime should sort the results). One side note, you don’t need to quote tags - or #tag or #tag2 is sufficient.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Backlinks Report: Semrush Manual manual
Semrush's Backlinks report lists every link our software found pointing to the queried domain. This report has helpful sorting, filtering, and exporting to ......
Read more >
How To Order Query Results in Laravel Eloquent - DigitalOcean
To sort results in the database query, you'll need to use the orderBy() method ... Default Link List showing links ordered by creation...
Read more >
SELECT - ORDER BY Clause (Transact-SQL) - Microsoft Learn
Sorts data returned by a query in SQL Server. Use this clause to: Order the result set of a query by the specified...
Read more >
File notes ordered by number of backlinks - Obsidian Forum
I only see that the notes can be ordered by file name, modified time or created time. I know I can go note...
Read more >
Sorting | Obsidian Tasks
To sort the results of a query different from the default, ... done (the date when the task was done); path (the path...
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