Hi all,
First of all, my apologies if this question is answered previously, or I’m making a mistake
I tried to find information about the issue before and finally, I don’t find anything related
What I’m trying to do
I’m trying to deploy a meeting template that ask me for some variables (Title, Meeting Status, Meeting Location). When I try to use the values of the variables in frontmatter into the body I retrieve undefined
as result
for example:
<% tp.frontmatter.meeting_status %>
shows undefined
as a result.
<% tp.file.title %>
shows untitled
as a result
That’s the code for my template:
---
<%*
const title = tp.file.title
if (title.includes("Untitled")) {
const newTitle = await tp.system.prompt("File Name")
await tp.file.rename(newTitle)
}
-%>
creation_date: <% tp.file.creation_date("DD/MM/YYYY HH:mm") %>
creation_year: <% tp.file.creation_date("YYYY") %>
modified_date: <% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %>
type: meeting
meeting_status: <% await tp.system.suggester(["Interna", "Externa"], ["Interna", "Externa"]) %>
meeting_location: <% await tp.system.suggester(["Virtual", "In Person"], ["Virtual", "In Person"]) %>
summary: ""
---
# [[<% tp.file.title %>]]
## Meeting Details:
- Meeting Status: <% tp.frontmatter.meeting_status %>
- Meeting Location: <% tp.frontmatter.meeting_location %>
When I apply the template, I see undefined
in case of the value
Environment
OS: macOS Sonoma
Obsidian version: v1.4.16
Obsidian installer: v1.4.14
Templater plugin version: latest update (10/10/2023)
Things I have tried
- I tried to reinstall the plugin wiht (no luck)
- I tried to switch off and switch on the plugin (no luck)
Thanks in advance
Regards