I can help only in DQL queries, not JS.
Let’s start with your query:
TABLE WITHOUT ID name
FROM "Stocks/Data"
WHERE (ticker = this.Ticker)
What’s name?
You define the source: FROM "Stocks/Data"
You define one filter: WHERE ticker = this.ticker (attention: this works only if you have only one ticker value per file/note → if not, you need to use the function contains() → if you use a field in frontmatter with [] this automatically create a list, even if only one value > because this you need to use the contains function: something like WHERE contains(ticker, this.ticker))
Now, I ask: what you want to see in the output? The file name? The file link?
TABLE WITHOUT ID file.link as Name
FROM "Stocks/Data"
WHERE contains(ticker, this.ticker)
or, if name is a custom field
TABLE WITHOUT ID name AS Name
FROM "Stocks/Data"
WHERE contains(ticker, this.ticker)
About dvjs, I only know that this doesn’t exists (you need to use dv.current()) and contains also doesn’t exists (I think you need to use .includes())
Hi thanks for your reply.
What’s name ?
=> it’s in the YAML of each file. e.g. name: [“name of the company name”]
You define one filter: WHERE ticker = this.ticker (attention: this works only if you have only one ticker value per file/note → if not, you need to use the function
=> Yes correct, I don’t want to use Contain as it would bring many files, I just want the 1 file where ticker = “BMO.TO” for example.
Now, I ask: what you want to see in the output? The file name? The file link?
=> Yes, the file link and the YAML field “name” as per above.
if in yaml frontmatter you CAN´T use ["value"], just ticker: "BMO.TO" (attention to the ", not “)
in an inline field you CAN´T use either ["value"], just ticker:: BMO.TO or ticker:: "BMO.TO"
the query
TABLE name
FROM "Stocks/Data"
WHERE ticker = this.ticker
(Sometimes it’s difficult to give direct answers without all the needed information. For example, a bad syntax in fields can destroy any query attempt.)
In yaml if you add []you’re saying “this is a list/array”, even if only one value inside. In that case you need to use contains().
For comparations as single values you need to remove them.