Clone detail table and apply condition

Hi there,

Recentely, I am working on a data like below

ID Item DES Price
Test1 A aa 1
A aa 1
A aa 1
B bb 2
B bb 2
C cc 3
C cc 3
D dd 4
D dd 4
Test2 A aa 1
A aa 1
A aa 1
D dd 4
D dd 4

data boundaries set as ID change

I have extracted detail table by using repeat until no more elements

So that for Test1 I have a entire detail[9] table which contains 3A 2B 2C and 2D

Now I need another 4 individual detail table for ABCD only

Is there any way I can duplicate entire details table but with conditions?

at the end
Test1 will have 5 detail tables
entireDetails[9]
ADetails[3]
BDetails[2]
CDetails[2]
DDetails[2]

Test2 will have 5 details tables
entireDetails[5]
ADetails[3]
BDetails[0]
CDetails[0]
DDetails[2]

Many thanks

Any help or suggestions?

Hey Mighty2,

I’ve been having a look at this for you and i’ve found a solution for you that uses the multiple conditions step in datamapper to create the table and subtables you’d like.

So in the example datamapper attached, i extract the details as normal but then i add the multiple conditions step that creates the ability to have multiple conditions set, so i used the ITEM as the check and if it’s A B C D it goes down a different path and creates a record in that table.

Happy to explain it deeper if needed but the datamapper is attached so you can see it in action!
Testing.OL-datamapper (4.0 KB)
testingLP.txt (348 Bytes)

Thanks so much for your help.

Yes, setting multiple conditions was the first thing that came to mind for me as well, but I believe I may have set it up the wrong way, which caused the same loop to run five times.

Could you please save the DataMapper in the 2022.1 version? It shows as an invalid config when I try to test it.

Cheers

Hey,

Here it is down saved to 22.1! Hopefully it helps :slight_smile:
Testing22-1.OL-datamapper (4.0 KB)

Thanks lot! It does work.

My old extract and looping logic was wrong.

Fantastic to hear, glad i could help :slight_smile: