Welcome to openkapow Sign in | Join
in Search
.

Extract Different data from alternate rows

Last post 09-30-2008, 2:46 PM by Klaus_Kapowtech. 1 replies.
Sort Posts: Previous Next
  •  09-25-2008, 2:01 PM 21331

    Extract Different data from alternate rows

    Ok, So I have a table from which I have to extract a particular set of data from odd rows and another set of data from even rows. I understand how to do them individually (do "From tag path" on tr, start row from 0 for even and 1 for odd,and change increments to 2). So what I have is two for each loops.

     Since I am creating a REST service, each set of data goes under a unique item tag. But I want to merge the results from these 2 loops. 

    For example, say I get NAME from odd rows and I get AGE from even rows, Then I want the Name and the following Age to come under one ITEM tag. But sine I am using two loops, NAME goes under a different ITEM tag and AGE goes under a different ITEM tag.

     Hope this was not confusing.

     

    Thanks
     

    Filed under: ,
  •  09-30-2008, 2:46 PM 21371 in reply to 21331

    Re: Extract Different data from alternate rows

    Loops are stateless so it is hard to concatenate results from multiple iterations. When you loop you get a Current Tag (The blue one) around the current row, but you can easily extract data from an adjacent row, above or below. So here is what I would do:

    Set the loop to skip one row, Within an iteration extract the data from within the current row to the output, and then extract the data from the row below into the same object before returning the object. 

    If there are empty spacer rows that could throw of the skipping of rows, loop over each row, and then instert a Test Tag that only allows the execution flow to pass down the first rows.

View as RSS news feed in XML
.
Copyright 2006, 2007 KapowTech.com All Rights Reserved Company | Contact | Terms | Privacy