# Expression to get parameter data does not work

**URL:** <https://community.n8n.io/t/expression-to-get-parameter-data-does-not-work/25730>\
**Category:** Questions\
**Tags:** core, node\
**Created:** [April 29, 2023, 9:02pm UTC](https://community.n8n.io/t/expression-to-get-parameter-data-does-not-work/25730 "2023-04-29T21:02:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FelixL](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/felixl/32/24866_2.png) [@FelixL](https://community.n8n.io/u/FelixL)\
**Post date:** [April 29, 2023, 9:02pm UTC](https://community.n8n.io/t/expression-to-get-parameter-data-does-not-work/25730/1 "2023-04-29T21:02:18Z")

</div>

I am experimenting with node development a little and wanted to add better description text to my expanded “Execute Workflow” node. [Composite nodes - #10 by FelixL](http://community.n8n.io/t/composite-nodes/5629/10)  
I wanted to use something like:

```auto
subtitle: '={{"Workflow: " + $parameter["workflowId"]["cachedResultName"]}}'

```

But that does not work.  
Following ts code works in the ts portion of the node

```auto
console.log(this.getNodeParameter('workflowId.cachedResultName', 0))

```

As i copied most of my code from the n8n API node, i tried it directly with the original n8n API node with an expression in n8n:

 ![grafik](https://europe1.discourse-cdn.com/n8n/original/3X/3/7/37ea8353e4877a6ad2dc493763db83d08324e59a.png)

The variable selector correctly shows the cachedResultName, like I would expect from the code in the node.  
But even when it automatically generates the expression for “cachedResultName” it returns: `[undefined]`

Is there a workaround for that issue, or am I just overseeing something?

_And an off-topic question, is it possible for a node to change its icon dynamically? Have not tried that yet, but that would be super cool ^^_

## Information on your n8n setup

- **n8n version: 0.225.2**
- **Database (default: SQLite): SQLite**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main): default**
- **Running n8n via (Docker, npm, n8n cloud, desktop app): npm**
- **Operating system: Win 11**

EDIT: updated subtitle code (originally copied debugging code…)

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [April 30, 2023, 9:40am UTC](https://community.n8n.io/t/expression-to-get-parameter-data-does-not-work/25730/2 "2023-04-30T09:40:25Z")

</div>

Hey @FelixL,

What is the error you get when trying that? I am not sure why you would want to use console.log for the nodes subtitle it sounds like potentially a bad idea.

Dynamic icons is not something I have tried as it isn’t something we do with existing nodes so I wouldn’t expect it to work 🙂

---

<div class="post-metadata">

**Author:** ![FelixL](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/felixl/32/24866_2.png) [@FelixL](https://community.n8n.io/u/FelixL)\
**Post date:** [April 30, 2023, 9:52am UTC](https://community.n8n.io/t/expression-to-get-parameter-data-does-not-work/25730/3 "2023-04-30T09:52:38Z")

</div>

Hi @Jon, i just copied the false line, was trying to debug why it was not working -\_-

Here is the correct line I’ve tried:

```auto
subtitle: '={{"Workflow: " + $parameter["workflowId"]["cachedResultName"]}}'

```

But that also does not work in the expression directly in n8n, even though the variable selector generates the expression like that.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 29, 2023, 9:53am UTC](https://community.n8n.io/t/expression-to-get-parameter-data-does-not-work/25730/4 "2023-07-29T09:53:35Z")

</div>

Closed on July 29, 2023, 9:53am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
