Data disappearing

Describe the problem/error/question

Column values that appear during tests of an individual node (in this case a postgres query) don’t appear when I run the the workflow (or when I run a test on the subsequent node, it then disappears).

What is the error message (if any)?

There’s an exclamation mark next to the Output heading that says: “Node parameters have changed.
Test node again to refresh output.”
I’ve tried recreating an entirely new node with the same settings and it produces the same error message on first execution.

Please share your workflow

It’s got sensitive data from my so I can’t share the workflow … also I can’t select nodes because I can’t left-click on the canvas (have already tried disabling touch screen).

But here is a screenshot, I’ve highlighted the url column which currently shows the expected URLs but when I test the entire workflow the same rows display an empty value (similar to the adjacent column)

Information on your n8n setup

  • **n8n version:1.34.2
  • **Database (default: SQLite): Postgres
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): not sure what this means?
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • **Operating system: Windows

Hey @jamescv,

Without seeing an example of the data and a sample worklfow that reproduces it there is not really a lot we can do here. Are you able to create a mock posgres database and workflow to see if the issue happens there? It could be that some items have the data and others don’t and we try to be helpful in the UI and hide them if it doesn’t exist.

Ok I’ve been able to recreate it in a really simple workflow and will try and publish it here.

In the mean time here are before and after images of the disappearing or altering data:.

After testing Node 1 (correct output):
image

Before testing Node 2 (incorrect input from Node 1):

After testing Node 2 (incorrect input and output):

Here is the code (hopefully, I’m not sure if I understand how to click ‘</>’ …):

Hey @jamescv,

Thanks, That has worked. For some reason the null value is tripping it up. I have created NODE-1328 as the internal ticket to get to the bottom of this one.

Thanks Jon. The original data has a another column that includes a “Y” that I can construct the if statement with, and it also produces the same issue.

See the second row of nodes:
{
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “dd03d9cb498785120d8a498a063118e303fdd6c6c29744ddc567c10a9974bdce”
},
“nodes”: [
{
“parameters”: {},
“id”: “2c0c1995-26e7-4cfe-b258-c7df2eeec818”,
“name”: “When clicking "Test workflow"”,
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
220,
460
]
},
{
“parameters”: {
“includeOtherFields”: true,
“options”: {}
},
“id”: “8a1fa468-27f4-40c1-9a6a-bacbd256274e”,
“name”: “Node 1 - Null test”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.3,
“position”: [
440,
460
]
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “2f873233-10ce-4128-99e8-be3c3f12b753”,
“name”: “$json[‘\‘Current_Name\’’]”,
“value”: “={{ $json[‘\‘Current_Name\’’] = ‘null’ ? true : false }}”,
“type”: “string”
}
]
},
“options”: {}
},
“id”: “153fac38-3983-4472-bec2-715572e6c46e”,
“name”: “Node 2 - Null test”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.3,
“position”: [
680,
460
]
},
{
“parameters”: {
“includeOtherFields”: true,
“options”: {}
},
“id”: “ef81f37e-01e7-4dc4-806f-5de8122287a0”,
“name”: “Node 1 - ‘Y’ test”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.3,
“position”: [
440,
680
]
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “2f873233-10ce-4128-99e8-be3c3f12b753”,
“name”: “$json[‘\‘Current_Name\’’]”,
“value”: “={{ $json["current_name_indicator"] = ‘Y’ ? true : false }}”,
“type”: “string”
}
]
},
“options”: {}
},
“id”: “fe51a0ea-9b1c-4904-9629-555b31718964”,
“name”: “Node 2 - ‘Y’ test”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.3,
“position”: [
680,
680
]
}
],
“connections”: {
“When clicking "Test workflow"”: {
“main”: [
[
{
“node”: “Node 1 - Null test”,
“type”: “main”,
“index”: 0
},
{
“node”: “Node 1 - ‘Y’ test”,
“type”: “main”,
“index”: 0
}
]
]
},
“Node 1 - Null test”: {
“main”: [
[
{
“node”: “Node 2 - Null test”,
“type”: “main”,
“index”: 0
}
]
]
},
“Node 1 - ‘Y’ test”: {
“main”: [
[
{
“node”: “Node 2 - ‘Y’ test”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {
“When clicking "Test workflow"”: [
{
“id”: “123”,
“company_name”: “ABC HOLDINGS LIMITED”,
“current_name_indicator”: “Y”,
“current_name”: “null”
},
{
“id”: “124”,
“company_name”: “ABC PTY LIMITED”,
“current_name_indicator”: null,
“current_name”: “ABC HOLDINGS LIMITED”
}
]
}
}

Hi @jamescv,

I looked into this and the expression in your 2nd Set node is modifying the output data of the first Set node.

$json.Current_Name = 'null' ? true : false
// => $json.Current_Name = true

You probably want:

$json.Current_Name === 'null' ? true : false
// or shorter:
$json.Current_Name === 'null'

It is strange that expressions can modify data of other nodes. I’m taking this further internally to see how we can fix this.

3 Likes

Hi @elsmr

Thanks for this advice. I wasn’t aware of the difference between “===” and “=” as I’m very much an amateur programmer (hence the attraction to n8n). Though the true / false were just place holders, I’m using different values ultimately hence the longer structure.

But yes I did think it was strange that it could flow backwards. I’m guessing there are variables set for each node somewhere, and that it uses whichever is the last node that you’ve tested when you’re in ‘edit’ mode?

Thanks again

1 Like

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