# How to make node ID lowercase

**URL:** <https://org-roam.discourse.group/t/how-to-make-node-id-lowercase/3665>\
**Category:** Troubleshooting\
**Created:** [November 14, 2024, 11:16pm UTC](https://org-roam.discourse.group/t/how-to-make-node-id-lowercase/3665 "2024-11-14T23:16:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![orgroamer](https://avatars.discourse-cdn.com/v4/letter/o/54ee81/32.png) [@orgroamer](https://org-roam.discourse.group/u/orgroamer)\
**Post date:** [November 14, 2024, 11:16pm UTC](https://org-roam.discourse.group/t/how-to-make-node-id-lowercase/3665/1 "2024-11-14T23:16:25Z")

</div>

I’m using `:target (file+head (downcase "${id}.org"))` in a capture template but am getting the error `Wrong type argument: char-or-string-p, (downcase "${id}.org")`.

I do not see why the error is being thrown because `"${id}.org"` is a string, so isn’t `(downcase "${id}.org")` a string too? I ran it in the scratch buffer and indeed it worked. My only guess is that something strange is happening during/after the ID is being substituted in.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [November 15, 2024, 9:20am UTC](https://org-roam.discourse.group/t/how-to-make-node-id-lowercase/3665/2 "2024-11-15T09:20:13Z")

</div>

Just taking a short break off work. Excuse the brevity.

- You need to escape `(downcase STRING)` with a “%” inside the `capture-templates`. It’s the same as Org. Suggest you to refer to the docstring of `org-roam-capture-templates` and find a mention of `%(sexp)`.
- You also likely need to escape the double quotation marks for string argument, because the whole template value is already a string. I believe the error is coming from this.

So I think it should be `"%(downcase \"<your string>\")"` inside your capture-template.

---

<div class="post-metadata">

**Author:** ![orgroamer](https://avatars.discourse-cdn.com/v4/letter/o/54ee81/32.png) [@orgroamer](https://org-roam.discourse.group/u/orgroamer)\
**Post date:** [November 21, 2024, 7:50pm UTC](https://org-roam.discourse.group/t/how-to-make-node-id-lowercase/3665/3 "2024-11-21T19:50:42Z")

</div>

That is now working, thank you very much!
