Four Stars

Copy input to multiple rows

Hi,

I need to create n multiple output rows for an input row depending on a field in the input row. I tried with tJavaFlex but failed. The iteration is to limited due to the fact that I need variable iterations based on the input, see example below. After the duplication each row's fields will be changed (field Account).  Any clue how I could achieve this? Thanks

ExampleExample

Tags (1)
3 REPLIES
Twelve Stars

Re: Copy input to multiple rows

I'm afraid your example data doesn't show how or why the rows are multiplied. However, so long as you understand this, you can use this tutorial to carry this out (https://www.rilhia.com/quicktips/quick-tip-row-multiplication). You will first need to understand a rule for multiplying each row, once you have that, just convert it into some simple Java mechanism and use it with the example.

Rilhia Solutions
Four Stars

Re: Copy input to multiple rows

Thanks for your reply.

The rule for how many rows I need to create depends on the account in the input. I wanted to do something like

if account = A then create row with account A1 and create row with account A2

if account = B then create row with account B1 

if account = C ... t

Twelve Stars

Re: Copy input to multiple rows

OK, that is entirely possible using the tutorial I gave you. You will need to look at the looping logic in the tJavaFlex and implement it there.

Rilhia Solutions