I am struggling with a recursive loop I am working on.
Task:
I am having a table with five rows where I want to replace values in certain cells, if a number matches the values from another table (also five rows).
For that, I am using the recursive loop.
Problem:
Either I am receiving all tables multiplied (25 exactly, because five rows multiplied with the other table.) Or I receive five rows, but only one table is updated. The last one.
Based on the description, it should work like this. But I don’t know what else to do.
I know, I could switch to a variable condition loop, but if there is already a build in function, why use another one.
Also I add two screenshots, eventually you can point me in the right direction.
Recursive Loops can be a bit confusing sometimes, there’s no doubt about that. But maybe someone here can help troubleshoot. First, could you please upload your workflow with some dummy data, as opposed to screenshots? Probably no one wants to guess at the contents of all your Rule Engine nodes, and how you have constructed the logic.
In the meantime, you might have a look at this short video to see if it helps:
Hi @patric , if your goal is to learn how to use Recursive Loop, then it’s fine, you can use Recursive Loop.
But if your goal is to complete the task that you want to do, it looks like Recursive Loop is not really the ideal solution.
As @ScottF mentioned, this can be solved via a Joiner node, which would be much faster than a Recursive Loop, or any loop for that matter (the reason being that with a Loop, you have to go through several iterations while the Joiner node will do everything in 1 iteration), and much simpler (most of the rule engines that you are applying might be applied already during the join).
First of all thank you @ScottF - this seems to work for me. And also thank you @bruno29a . You are both right, I might be able to use join. The problem is, that the original table needs to be cross-checked with a lot of data and sometimes, the data must be processed, before it can be applied to the table.
Like “The is a match in one row, then please check, if the address is from the EU and if this is a yes, then set the currency to EUR”. (This is not an actual example, that needs to be processed.)
Might thought was, that with the loop and the rule engines, I am having everything I need. But I will check evaluate the Join-Node and also will keep on testing your suggestion.