Skip to Content
0

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

Feb 09, 2017 at 04:17 PM

146

avatar image

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.

question1.png (3.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Prajesh Desai Feb 10, 2017 at 11:23 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Sabarna Chatterjee Feb 11, 2017 at 05:55 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded