Dynamic local links to set a new base path

Topic

Summary
  • How to concatenate the value of a field to a local link path under windows operating system?

Test

Summary
  • dataview: v0.5.46

Input

Summary

the current note

  • filename : 20220927_Q85_inDQL10
---
LINK: "C:/Users/reusable_path"
---

### inDQL10




dictionary files

  • filename : filename.pdf
    • Location: “file:///C:/Users/reusable_path/Math/filename.pdf”

inDQL10_concatenate_a_field_to_a_local_link_path

Summary

inDQL10_concatenate_a_field_to_a_local_link_path

Summary_code
---
LINK: "C:/Users/reusable_path"
---

### inDQL10
local link=`="[File Title](file:///" + regexreplace(this.LINK, "\s", "%20") + regexreplace("/Math/filename.pdf", "\s", "%20") + ")"`


Screenshots(inDQL10)

Part 1/2

Part 2/2


2 Likes