cancel
Showing results for 
Search instead for 
Did you mean: 

accessing the value of the context of Interactive form from javaScript

Former Member
0 Kudos

Dear Experts,

I have been having hard time to access my context node of my form from javascript.

I pass an internal table Materials to my form. The drop downlist MATNR contains the biding $record.MATERIALS.DATA[].MATNR. This drop down list is the cell in the items table. when a user selects a material from drop down list i need to show material short_text and price from the context (MATERIALS.DATA[].SHORT_TEXT) in the short_text_cell and price_cell of the item table.

I have tried several ways, can't figure out why it can't find the node: I am just using 1 as an idex to test if it works and then will put it in a loop for nodMatnr.

-


data.PO.subItems.POITEMS.Item.MATNR::change: - (JavaScript, client) -


MATL_GROUP.rawValue = xfa.event.newText;

var nodMatnr = xfa.resolveNodes("xfa.record.MATERIALS.DATA[*].MATNR");

PriceCell.rawValue = nodMatnr.item[1].value;

PriceCell is always empty.

thank you very much!!

Regards,

shoira

Accepted Solutions (0)

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

Hello, I don´t know if there is a "right" solution but I can provide a quick one.

Use Javascript, use mouseExit event. Write code like this:

if (yourDropDown.selectedIndex < 0) do nothing

else you have an index in this selectedIndex

and you can address your detail elements....

Hope it helps