# Selected Node as Capture Target

**URL:** <https://org-roam.discourse.group/t/selected-node-as-capture-target/2417>\
**Category:** Troubleshooting\
**Created:** [January 30, 2022, 7:22pm UTC](https://org-roam.discourse.group/t/selected-node-as-capture-target/2417 "2022-01-30T19:22:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![falsemirror](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@falsemirror](https://org-roam.discourse.group/u/falsemirror)\
**Post date:** [January 30, 2022, 7:22pm UTC](https://org-roam.discourse.group/t/selected-node-as-capture-target/2417/1 "2022-01-30T19:22:54Z")

</div>

Hello I’ve only used org-roam for a few months and have hit a roadblock in setting up a more complex `org-roam-capture-template` configuration.

I am trying to set the `:target` dynamically to the node selected by `org-roam-capture`. However anything other than a static Name/ID/Alias declaration doesn’t seem to work?

([Most related discussion I could find here](https://org-roam.discourse.group/t/help-with-template-and-file-olp/2264/9))

For example, I have a hub file called `films.org` with the following structure:

```auto
:PROPERTIES:
:ID: edbdfce7-a1aa-4516-ab0f-db2b0c1b560e
:END:
#+title: Films
#+TODO: TOWATCH STARTED | WATCHED WALKOUT

* SciFi :scifi:

** Blade Runner :noir:cyberpunk:
:PROPERTIES:
:ID: edbdfce7-a1ba-4516-af0f-d82b0c1b760e
:END:

*** Synopsis
Blade Runner is a 1982 science fiction film directed by [[Ridley Scott]], and adapted by Hampton Fancher and David Peoples ...

*** Review for <2022-01-30 Sun> viewing
After reading [[Do Androids Dream of Electric Sheep?]] by [[Philip K. Dick]] I noticed ...

* Inbox

```

To make this work I have two capture templates. The first one simply adds a new film node to the file under the Inbox (which works). The second is my attempt to capture a “Review” subheading.

```auto
(org-roam-capture-templates
                    '(("d" "default" plain ...)
                      ("f" "film")
                       ("fa" "add film" entry 
                         "* ${title} \n:PROPERTIES:\n:ID: %(org-id-uuid) \n:END:\n** Synopsis %?"
                       :target (file+head+olp "20211114-films.org" "* Inbox\n"("Inbox")))
                       ("fr" "film review" entry "* Review for %^t viewing\n%?"
                       :target (node "${title}" ))))

```

When running the review template, it returns that there is no node with the title “${title}”. I have a similar issue with any `%(sexp}` I put there as well. However if I hard code it as `:target (node "Blade Runner")` it works as intended (for that node only, of course).

I’ve had trouble finding examples of node as the `:target`, but `${slug}` and similar seem to work for file name variables so I’m a bit confused.

Appreciate any guidance, thanks!
