I am a beginner in n8n. I am reaching out to you because I need your help with performing a calculation in the workflow below. I am stuck at the last two nodes: “summarize” and “result.”
For the “Summarize” node, I need to apply the following business rule (for the “cust1” case):
If the amount in the “SubRed_Amount” field corresponding to “SOD” in the “TypeOpe” field is greater than the “ROD” amount, then calculate and display the difference (409000) in the “subRed_Amount” field and indicate “SOD” in the “TypeOpe” field (ultimately resulting in only one line).
If the amount in the “SubRed_Amount” field corresponding to “ROD” in the “TypeOpe” field is greater than the “ROD” amount, then calculate and display the difference (409000) in the “subRed_Amount” field and indicate “SOD” in the “TypeOpe” field (ultimately resulting in only one line).
I hope the description of the issue I am facing is clear and explicit enough.
Thank you in advance for your assistance.
Best regards.
Nodes on canvas :
Ouput returned on “Summarize” node :
i would like just 1 line for cust1 (SOD or ROD with the calculated amount on the ad’hoc field)