What I’m trying to do
it is possible to get a date from another file (file_B
) and let dataview work with that “fetched” date in file_A
?
Things I have tried
Lets say I have a field in the metadata section of file_A
like
testDate:: $=dv.date(dv.page("File_B").date_x)
further below I want to access to this file testDate
like this
```dataviewjs
{ if (dv.current().testDate.diff(dv.date('today'),'days').days <0)
...
```
then DVJS grumbles with:
Evaluation Error: TypeError: dv.current(...).testDate.diff is not a function
Does this have something to do with asynchrony, or do I have to convert the value into a certain format/object?
Or is it not possible to achieve this?
edit:
so, I tested around…
The Problem is, if I grab the date_x
from file_B
in file_A
, the output shows the correct date (in this case testDate:: 2023-08-30
)
but, as soon as I want to grab this value testDate
from another file (file_C
), the error occurs.
I made a graphic to illustrate it a little better: