Describe the problem/error/question
I want to dynamically change the database name field inside a credential, based on a value selected in a previous node , since multiple databases exist on the same server and I need to switch between them at runtime.
When I try to use an expression in the credential’s database name field (referencing data from a previous node),
I get this error:ERROR: No path back to node
Is there any supported workaround to switch database names dynamically per execution?
Edit: I’ll try to be clearer.
It’s my MSSQL credential setup. Through a dropdown, I am selecting the DB name, and then some query nodes are executed further (in that DB).
What I am trying to do: since there is an option to take the DB name through an expression, I tried:
-
$(‘NodeName’).item.json (error: No path back to node)
-
{{ $(‘NodeName’).first().json.databaseName }}
The second one didn’t throw an error — it got saved and executed, but returned no output.
So I’m not sure what I’m missing in passing the selected DB name dynamically.