cancel
Showing results for 
Search instead for 
Did you mean: 

How to check the table row field value dynamically in adobe interactive form.

sabarna17
Contributor
0 Kudos

Hi experts,

I have to read a table row based upon user inputs in other table.

I have checked many posts in SCN and tried to solve the issue. I tried to code it like below. It isn't working at all. Solution urgently needed.

var item_row_count = data.Page1.Item_details.Body.all.length ;

for ( var i = 0 ; i<item_row_count ; i++ )

{

if ( this.EBELP.rawValue = data.Page1.Item_details.Body[i].EBELP.rawValue )

{

this.TEXT_VALUE.rawValue = data.Page1.Item_details.Body[i].TEXT.rawValue ;

}

}

Here I have written the code on DATA.

NB - "Item_details" is another table declared previously and "Body" is the bodyrow of that table. I want to update the "TEXT_VALUE" field for each line item of "Table" if the EBELP is similar with the EBELP of "Item_details" table. This is a offline interactive form.

Accepted Solutions (1)

Accepted Solutions (1)

prajeshdesai
Contributor
0 Kudos

Have a look at my document on adobe scripts,

Adobe Forms using Javascript

var IMTEST = xfa.resolveNodes("$record.IM_TEST.DATA[*]");
var LV_DATA;
for( var i =0; i < IMTEST.length; i++ )
{
     LV_DATA = xfa.resolveNode("$record.IM_TEST.DATA["+ i +"].FIELDNAME").value;
}


/*
Where,
INDX : index of table record. (start from zero).
LV_DATA : variable to hold data
IM_TEST  : context table variable (Import parameter variable)
FIELDNAME : name of field in internal table
*/

Hope this helps

Answers (1)

Answers (1)

sabarna17
Contributor
0 Kudos

Hi Prajesh,

I have already tried to write this scripts you mentioned. But in my scenario, I have to read the table1 field value dynamically from another table (table2).

The requirement is - if user enters EBELP in table2 , the EBELP has to be read and check the TEXT_VALUE for that EBELP from table1 and then have to be displayed in the table2 TEXT_VALUE field for the corresponding EBELP.

Thanks in advance.