cancel
Showing results for 
Search instead for 
Did you mean: 

ADOBE PRINT BASED: javascript for accessing data not displayed in page

prabhu_s2
Active Contributor
0 Kudos

Hi

I am running into issues when trying to access the contents of an context [form of internal table] that is not displayed in the page.

Replica of my data view is:

ZFIEXPRS

|____CARDS

     |__DATA

          |___ACCOUNT

          |___SCORE

          |___FRCSF

          |___TEDSE

          |___FLAG

With the program been triggered it extract 25 records and creates 25 pages. In each of the page I want to display a text based on the contents of the context element FLAG,

I tried to access the FLAG by:

this.parent.dataNode.CARDS.DATA.FLAG.value;

But i could see that it access only the first instance of the node and the same is copied to rest of the page, in other words only the first entry of the internal table is accessed. How i can access this variable in each of the page, such as in page one it would be CARDS[1]-FLAG, page 2 it is CARDS[2]-flag etc etc? Pls can any help be offered?

Accepted Solutions (1)

Accepted Solutions (1)

saudshaikh
Explorer
0 Kudos

Hi,

To access your data node which is not mapped to any UI element in form can be done using javascript as following:

var oItems = xfa.resolveNode("xfa.record.CARDS");   

var nItemsLength = oItems.nodes.length;

   

for (var nItemCount = 0; nItemCount < nItemsLength; nItemCount++)

{ // Begin Loop 1           

       

        if (oItems.nodes.item(nItemCount).FLAG.value == "SOMEVALUE")

          {

            //Here write your logic for filling up contents of your text

      }

}

Please note, the location/event where this logic should be included needs to be thought off. As per your message i get the idea that it is either based on page nos./some other data in UI element. In either case use the events of the respective elements.

prabhu_s2
Active Contributor
0 Kudos

thanks saud, it worked.

Answers (0)