I have a table with one column, and I add the $$rowindex$$ (rowindex_math) and the $$rowcount$$ (rowcount_math) to it via the Math formula node. My table then looks like this:
Next I want to split my table. I do this in 2 ways
$$ROWINDEX$$ = $$ROWCOUNT$$ => TRUE
and that gives me this result, which makes me wonder if this is correct:
If I create the filter on the rowindex_math and the rowcount_math that are calculated via the Math Formula node ($rowindex_math$ = $rowcount_math$ => TRUE), then there is no record that meets this requirement. Which makes sense.
It seems that Rule Based Row Splitter has a different idea of ROWCOUNT and/or ROWINDEX than the Math Forumla node.
The Rule Engine node seems to be working fine.
Hi @HansS , yes there are indeed inconsistencies across nodes with the value of Row Index. Some nodes think it starts at 1 and others think it starts at 0. I think it is recognised that it occurs but for backward compatibility reasons cannot be fixed.
The worst inconsistency for me is in Row Filter, where the node is actually inconsistent with itself
Ordinarily whatever you see in the config of a node is what you can pass in with a flow variable. But Row Filter doesn’t behave like other nodes in this regard.
Take the following table:
If I manually enter the row range 3 to 7 in Row Filter
It treats it as if I’d manually entered 4 to 8, because it “decides” that I must now be using zero-based counting. That is most definitely inconsistent with flow-variable config behaviour elsewhere.
I thought I saw a new node (in 5.x) recently that did the same, but the only new nodes that spring to mind that have Row Number entered in this form are
Table Cropper
Cell Splitter
and both of these (certainly in 5.2) treat the flow variable value as if it were the manually entered value (ie what you see on the dialog is what you enter in a flow variable) and so do not behave like the old Row Filter does.
Thank you (again) for the clear explanation. Too bad nothing can be done about it. In the future I will be more careful with the row index even when used as a stream variable.
And yet another solution . Good job Brian !