yes, excuse me for being imprecise. The result should be the value of the other elements. To be clearer here are 2 examples of my case. (I modified the structure of my code but the system remains the same).
the code:
const notionData = $items("Notion (Beta)1");
let autredata = $items("Split In Batches");
notionData.forEach(element => {
if(element.name == autredata[0].property_type_de_bien){
let services = autredata[0].json.property_services;
const prixmontage = element.property_pvht_montage_coordination;
if (Array.isArray(services)) {
let montageService = services.find(service => service === "Montage");
if (montageService) {
autredata[0].json.property_temps_total = 67 ;
}
}
}
})
return autredata;
I assign 67 to otherdata[0].json.property_time_total.
As you can see the condition is correct and I get 67 in property_time_total. So the 2 tables are read correctly.
I assign element.property_pvht_montage_coordination to otherdata[0].json.property_time_total instead of 67. The base value of element.property_pvht_montage_coordination is 1390. So I should have as result property_time_total = 1390 but I opt for null instead.
const notionData = $items("Notion (Beta)1");
let autredata = $items("Split In Batches");
notionData.forEach(element => {
if(element.name == autredata[0].property_type_de_bien){
let services = autredata[0].json.property_services;
const prixmontage = element.property_pvht_montage_coordination;
if (Array.isArray(services)) {
let montageService = services.find(service => service === "Montage");
if (montageService) {
autredata[0].json.property_temps_total = prixmontage ;
}
}
}
})
return autredata;
Well I wanted to update n8n because maybe it was a bug and that an update would fix it but now I have âBad Gatewayâ, the problems follow each other âŠ