cancel
Showing results for 
Search instead for 
Did you mean: 

Display the Item Length in an xml-file (resolveNodes)

Former Member
0 Kudos

Hi All,

The Problem is that, I created a Purchase Order form. In this form there is a dynamic tble, which will be filled with data from items in an xml-file,

so the xml-file includes 4 Items with the same name <Item>. and every Item has several Nodes and one of them is ShipToLocation, which

again includes FormattedAdress with four Lines Description.

So to access the data,hold in the nodes (Lines Description) i used the resolveNodes method.

var firstLineData = $.record.resolveNodes("PurchaseOrder.Item[*].ShipToLocation.FormattedAddress.FirstLineDescription");

var i4_fi_Line = firstLineData.item(4).value;
var iLength = Item.length; //  how many Item are there
xfa.host.messageBox("The Number of items in the Table = " + iLength); // Display the number of the Item

---->Problem: In the xml-file there is only 4 Items but it will be displaed 5 Items one of them has the Value "Null'

The Table in my form has then 5rows and the last one is filled with value "null"

To display the Value hold in Item[4], I used :

xfa.host.messageBox(" The data value hold in item 4: " + i4_fi_Line);

------> displayed is The data value hold in item 4: Null

My Question is: whre does the 5th Item come from and how to correct that

This is my first self created form and will be happy for every answer.

thanks

Edited by: Ahmed Kullab on Jan 31, 2008 2:15 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

i042339
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Can you please send me ur PDF form and XML file in the below email address .. I will analyse this and let you know what could be the possible problem.

p_satya123@yahoo.com

cheers

Satya

Former Member
0 Kudos

Hello Satyabrata Panda ,

Thank you for the very fast response. I can not see your email, but it is no problem you can send me just an empty email to my

email addres (@@@@) and soon I will send you my form and the xml-file.

thanks

Edited by: Ahmed Kullab on Feb 6, 2008 11:11 AM

i042339
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ahmed,

Can you please let me know the version of Adobe Life Cycle Designer and Adobe reader.?

I have recieved the PDF and XML file but not able to open the PDF on my machine.

Also send me the PDF file again. I am not sure how it is got corrupted.

cheers

Satya

Former Member
0 Kudos

Hello Panda,

I use Adobe LiveCycle Designer v.7.1 and PDF-reader 8.0. Anyway I found the reson of that issue.

Somewhere in the Table i placed a hidden subform named (subHidden4Line) witch includes 4 fieldes,

that are bonded to the ShipToLocation->ForamttedAdress-->FirstLineDescription to FourthLineDescription.

One of those fisled was bounded to the Item itself, witch efected the creation of a new Item with a null data entry.

I soulved the problem already, but if u r interrested u can try the form.

Untill new issues, thank u for your cooperativeness.

thanks

Edited by: Ahmed Kullab on Feb 5, 2008 2:25 PM

i042339
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks nice to know that prolem has been resolved. Please close the thread if your problem has been resolved.

Cheers

Satya