What I’m trying to do
Hi All.
I’m using templater’s Javascript Execution Command and there’s a problem that I can’t solve. Here’s what I wrote.
▼▼▼
company: <% await tp.system.prompt("company's name") %>
title: <% await tp.system.prompt("title") %>
<%*
const execution_value = await tp.system.suggester(["author", "journalist"],["author", "journalist"])
-%>
class: <%* tR += execution_value %>
<%* if (tR += execution_value == "author") { -%>
author:
<%* } else { -%>
journalist:
<%* } -%>
memo:
url: <% await tp.system.prompt("URL") %>
tags:
I chose “journalist” and the result is below
it showed the result of the excution(false) and also showed incorrect result value
Things I have tried
Before I wrote this i’d checked the templater manual
the code in example chapter
tR + execution_value
i tried that but it didn’t work and still showed wrong value.