During the creation of a workflow to assist with a question on the forum, I ran into strange and inconsistent behaviour on the Row Filter node with respect to row numbering.
In searching I now see that this was mentioned back in 2017, but haven’t seen it actually documented or acknowledged as a bug, which I believe it is.
Whilst additional comments in that 2017 post gave background regarding 0 or 1 based numbering schemes (which are now well documented as inconsistent across nodes) they did not actually deal with the fundamental issue that in this case that there is an inconsistency within the same node, causing undesirable changes in behaviour when using a flow variables.
By way of demonstration to save a thousand words, I have here a workflow containing a Table:
Inconsistent Row Filter numbering.knwf (14.6 KB)
If I manually filter, to return rows by number (rows 1 to 3)
I get the expected output:
The config dialog is quite clearly 1-based. It does not allow an entry of 0.
If I pass 1 and 3 as flows variables, as a proxy to entering it manually, then I expect (as with ALL other nodes that I have used), the values 1 and 3 to be respected as if they had been entered manually…
The Row Filter returns the following:
Only by passing the values 0 and 2 in flow variables as my start and end rows does it return the required result.
Of course I can see that for backward compatibility, it is possibly not desirable to fix this behaviour, but I thought it should be documented. Whilst I fully accept that there are differences in the way nodes approach row numbering, this issue isn’t actually about that. This is about the fact that passing a value as a flow variable as a proxy to entering that SAME value manually actually changes the result of the node, and this is definitely not ideal.