cancel
Showing results for 
Search instead for 
Did you mean: 

How to traverse and access the data area of a form?

Former Member
0 Kudos

I'm working with Java WD, and creating a PDF form of a set of context data.

I haven't been able to find out how to display an attribute of a context item which is marked as a lead selection - I thought that this would be easy, as in Web Dynpro when you create a TextView of an attribute in a node with cardinality 0..n, the lead selection dictates which 'row' is displayed in the TextView. However, when using LiveCycle Designer, only the first element in the node is displayed, which in my view is incorrect. Whatever.

My other solution is to use the id of selected item (conveniently stored in the context) to traverse the aforementioned node, and programatically return the description I want to place in the text view in the form. However, I can't determine how to access the data part of the form using neither Javascript nor FormCalc.

The Context structure is as follows:

A (1..1)
  B (0..n)
    ID
    C (0..n)
      ID
      DESCRIPTION

I can fetch the ID of the item in question by using this FormCalc code:

this.parent.ID.rawValue

But, how can I traverse the 'C' node, looking for the indicated ID value? I thought I would access the C node using this:

$data.A.B[0].C[0]

but that doesn't work. How can I do this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

It was a mapping issue.