Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

append rows to a table inside a loop

Hello

I got a table on which I have a loop over each record

during the loop i'm applying a certain condition on a field if the row matches the condition I want to add the row to a Table

can I use the concatenate(TableName)?

how can I create an empty table to append data to

I can walk on water when it freezes
5 Replies
lironbaram
Partner - Master III
Partner - Master III

hei

check this example

hope it helps you

sivaramr
Contributor II
Contributor II

Hi Lironbaram,

Can you please share the example in the body of the reply, because i am using Personnel edition and can't upload in my version to see your answer.

Thank you  

swarnendu
Creator II
Creator II

Hi @sivaramr  this the script ..

 

BaseData:

LOAD * INLINE [

    Champ1, Champ2, Champ3, Champ4, RowNumber

    A, 1, I, UN, 0

    B, 1, J, UN, 1

    C, 2, K, DEUX, 2

    D, 1, L, DEUX, 3

    E, 2, M, DUEX, 4

];

 

 

 

 

let counter = NoOfRows('BaseData');

 

for i=0 to $(counter)-1

 

Data:

load Champ1 AS c1,

Champ2 AS C2,

Champ3 AS C3,

Champ4 As C4

resident BaseData

where RowNumber =$(i) and Champ2=1;

 

 

 

next

---------------------------------------------------------------

And this is the UI:

 
 
1.PNG
sivaramr
Contributor II
Contributor II

Thanks Swarnendu

swarnendu
Creator II
Creator II

@sivaramr  Its my pleasure