cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Form internal table processing

Former Member
0 Kudos

Hi Experts,

I have written the code such as

var Items = xfa.resolveNode("xfa.record.ITAB.DATA")

var leng = Items.nodes.length

but getting error Error: accessor'Items.nodes.length' is unknown

I am using FormCalc script. How we process the internal table & get length.I am struggling last three days...Please help me out...

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

harman_shahi
Contributor
0 Kudos

Not sure about your data structure, but try getting the Table's length using the following code:

The Scripting language must be set to Javascript.

var tableNodes  = xfa.form.data.subformCodes.TableCodes.nodes;
var tableLength = tableNodes.length;
xfa.host.messageBox("tableLength: " + tableLength);

(you'll have to adjust the first line of code to match your structure)

hope this helps,

harman

Former Member
0 Kudos

Hi harman,

Thanks for ur reply.... I did not map the any UI Elements. It is an internal table.Could you please tel me how to find the internal table length ?

Thanks

Former Member
0 Kudos

To be clear, I have a field called Material ID, Material Text and Material Group. Material ID and Text mapped to Dropdown. Based on selected Material ID, I need to get the Material Group.

If I give the static row like below:


$.resolveNode("$record.GT_MAT.DATA[6].MATGR", " I can able to get the value. 

"But If I give in loop like below
$.resolveNode("$record.GT_MAT.DATA<i>.MATGR",  "its not working. 

Pls. help..

Former Member
0 Kudos

hi,

I guess you are not passing the index correctly.

$.resolveNode("$record.GT_MAT.DATA<i>.MATGR

is not correct. Instead you should give it like this.

var nodelength = "get the length of the node here..

for (i=0;i<nodelength;i++)
{
  $.resolveNode("$record.GT_MAT.DATA["+ i +"].MATGR"
}

Just be sure about the i outside the "" quotes.

Cheers,

Sam

harman_shahi
Contributor
0 Kudos

If the suggestion from Sam doesn't work, then try this:

$.resolveNode("$record.GT_MAT.DATA["+ (i) +"].MATGR")

OR

$.resolveNode("$record.GT_MAT.DATA["+ i +"].MATGR")

its a bit tricky...

regards,

harman

Answers (1)

Answers (1)

Former Member
0 Kudos

Solved