Hi @Hoctiep12A , I agree @gonhaddock 's comment and I agree that when posting a question such as this it is better to give a little more description to the problem, and specifics of your use case as this can lead to very different solutions and some will be more efficient than others. I also recommend explaining what the sequence is (even if it may appear obvious to you).
In this case we are to assume that the sequence is simply sets of 4 rows with ascending numeric as the first part with and rotating the letters A to D as the second part. I do enjoy puzzles, but …
Anyway, similar to the math formula and rule engine solution, this can also be achieved (if you have existing data against which the sequence is to be added) using String Manipulation, and then you don’t need a second node to deal with Strings.
The sequence does require a “modulo” calculation, which String Manipulation is lacking, but this can easily be achieved using basic maths…
join(
string(toInt($$ROWINDEX$$ / 4 ) + 1 ),
substr("ABCD", $$ROWINDEX$$ - toInt($$ROWINDEX$$ / 4 ) * 4 ,1)
)
So here, the equivalent of the Math Formula’s “ceil” function
ceil( ($$ROWINDEX$$ + 1 ) / 4)
is
toInt($$ROWINDEX$$ / 4 ) + 1
and the generalised conversion for MOD(n, m)
is n - toInt(n / m) * m
so
mod( $$ROWINDEX$$ , 4) + 1
is replaced by
$$ROWINDEX$$ - toInt($$ROWINDEX$$ / 4) * 4
(we don’t add the 1 because we’ll be using it in the substr function which uses zero for the first character of the string)
The substr function replaces the need for the Rule Engine by taking the nth item from the string “ABCD” and the join function concatenates the two.