I have a node that i am having issues with using values from previous nodes.
For example.
Now these values have no issues working, and i am pulling them from 1 node back.
When i change the input dropdown to a different node or use the edit expression option to grab previous nodes, i have no issue seeing the values i want to pull in however if i try to use one it gives me an error that i cant get data for expression
ExpressionError: Can’t get data for expression
at createExpressionError (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/WorkflowDataProxy.js:465:20)
at getPairedItem (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/WorkflowDataProxy.js:517:27)
at pairedItemMethod (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/WorkflowDataProxy.js:734:40)
at Object.get (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/WorkflowDataProxy.js:737:40)
at Proxy.eval (eval at getFunction (/usr/local/lib/node_modules/n8n/node_modules/@n8n/tournament/dist/index.js:24:22), :6:57)
at Tournament.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/tournament/dist/index.js:33:19)
at evaluateExpression (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/ExpressionEvaluatorProxy.js:110:16)
at Expression.renderExpression (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:217:70)
at Expression.resolveSimpleParameterValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:195:34)
at resolveParameterValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Expression.js:276:25)
So now i will add a new parameter to the body of the node called “WorkOrderDescription” and add the value linked to “name” in the “Items Lists” Node. You can see the data is pulling in.
I am trying to run this api call as many times as needed with the values of each row and the api will reply back with all the remaining required fields that i then need to post back in on another step ( haven’t got to that part)
Now, given all the values are mapping correctly in the input views do i still need to do this item linking thing and if so do i need to do that javascript in the values of this node?
Jo @Petero, did you add the paired/linked item logic to your code as suggested by Jan above?
If not you could alternatively consider using legacy expressions like {{ $node['Item Lists'].json.name }} which do not rely on these properties to be available, but you would need to make sure that neither the order nor number of your items change in this case.