Topic
Summary
- How to sort the data by the filename of a link?
Test
Summary
- dataview: v0.5.55
Input
Summary
dictionary files
- Location: “100_Project/02_dataview/Q73_When/Q73_test_data”
folder: Meeting
- filename :
dic_19520301
```md
---
date: 1952-03-01
---
- (when:: [[2025-01-01]]) (met:: Amna)
- (when:: [[2024-04-28 Friday]]) (met:: Joe)
- (when:: [[2027-01-09]]) (met:: Mitta)
- (when:: [[2023-03-30 Thursday]]) (met:: Peter)
### Q73_DQL10
```
folder: When
- filename :
2023-03-30 Thursday
```md
```
DQL10_filter_by_filename_of_a_link_and_TABLE
Summary
Main DQL
Code Name | Data type | Group By | Purposes | Remark |
---|---|---|---|---|
DQL10 _filter_by_filename _of_a_link _and_TABLE |
L.when :a link |
no | 1.To split up a list file.lists into each individual element L 2.To define a field variable s_filename_of_link 3.To sort by s_filename_of_link in ascending order 4.To display the result as a table |
NOTE: The Regular Expression in the DQL10 is based on the DQL10 in the following topic. - Solutions: by Justdoitcc |
Code DQL10_filter_by_filename_of_a_link_and_TABLE
Summary_code
title: DQL10_filter_by_filename_of_a_link_and_TABLE =>1.To split up a list `file.lists` into each individual element `L` 2.To define a field variable `s_filename_of_link` 3.To sort by `s_filename_of_link` in ascending order 4.To display the result as a table
collapse: close
icon:
color:
```dataview
TABLE WITHOUT ID
L.when AS "When",
L.met AS "Met",
s_filename_of_link AS "s_filename_of_link"
meta(L.when).path AS "path"
WHERE file = this.file
FLATTEN file.lists as L
FLATTEN regexreplace(meta(L.when).path, "^(.*/)(.+)(\.md)$", "$2") AS s_filename_of_link
SORT s_filename_of_link ASC
```
Screenshots(DQL10)
Part 1/2 :
Part 2/2 :
Reference
Summary
Q88_Links:Regular Expressions
- Q88_Links: Solutions
```dataview
FLATTEN regexreplace(meta(up).path, "^(.*/)(.+)(\.md)$", "$2") AS s_filename_of_link
```