I want to join a particular row in a Line Item Table to the above Row

  • 61 Views
  • Last Post 16 September 2019
Sunil Edupuganti posted this 29 May 2019

I have a LineItems Table, In that, there will be several columns and these LineItems will repeat in next pages too. In a way, it is a Multi-Page Line Item Table. I am trying to implement one thing here.

The first column is "HSNCode", Whenever this Row data is empty, If any other column data split to the next row, I want to join that row to the above row.

I have tried in different ways, But not succeded. Below is the code I have written, Could anyone please help me if anything wrong in this code to achieve my requirement.

string matchedItems = "";

for( int i = 0; i < Context.Field( "LineItemsTable" ).Items.Count; i++ ) 

{       

    string itemOrder = Context.Field("HSNCode").Items[i].Text;

    if(itemOrder == "")

    {

       matchedItems = matchedItems + Context.Field("MRP").Items[i].Text;

       Context.Field("MRP").Text = matchedItems;     

    }

}

Ekaterina posted this 16 September 2019

Hello,

Could you please send us the sample image and marked what data do you want to extract?

Close