cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass all values from one node element to created node element?

Former Member
0 Kudos

Hi

I have model node element under which there are 7 values, and I've created value node element and trying to pass the values from the model node Element to this value node element. But instead of passing all the values its listing only one value.

How do we rectify this problem!!!

Thanks in Advance

Srikant

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Please post the code also.

Regards, Anilkumar

Former Member
0 Kudos

Hi Anil

I've created the node named: TableNode

and the name of the node from which i want to get the data is : Li_Required_Node

the Node Structure is

Context

|_ Zs_Quantity_Input

|_Output

|_Node_Required_Node

|_Schddt

...

...

|_TableNode

|_CmpDate

The Schddt has some 7 values

The code Snippet is as follows:

IPublicPricesComp.ITableNodeElement nodeElement;

IPublicPricesComp.ILi_Required_NodeElement scheduleElement;

int counter3Max = wdContext.ILi_Required_Node().size();

for( int counter3= 0 ; counter3 < counter3Max ;counter3++ )

{

nodeElement = wdContext.createTableNodeElement();

scheduleElement = wdContext.nodeZs_Quantity_Input().nodeOutput_Contract_Qty().nodeLi_Required_Node().getLi_Required_NodeElementAt(counter3);

nodeElement.setCmpDate(scheduleElement.getSchddt());

wdContext.nodeTableNode().addElement(nodeElement);

}

On writing the above code and then binding the node to a table column only one value getting displayed

Where can be the error?

Thanks in Advance

Srikant

Former Member
0 Kudos

The code seems to be fine. Please try printing the size fo the node. I mean 'counter3Max'. Please let me know.

Former Member
0 Kudos

hi Noufal

The counter3Max has returned me the size= 7 exactly the no. of values in the Table Node

Thanks In advance

Srikant

Former Member
0 Kudos

Hi Srikant,

Have you tried debugging your code?

Code to get no. of records should be wdContext.node<node name>().size();

Check that once again.

Other things look fine.

Regards,

Bhavik

Former Member
0 Kudos

helo D V S,

ur code seems to be ok.

just try this:

instead of writing this

nodeElement = wdContext.createTableNodeElement();

try

nodeElement = wdContext.nodeTableNode().createTableNodeElement();

Regards,

Piyush.

Former Member
0 Kudos

Please repost your exact context structure including nesting, cardinalities and singleton-ness, and describe how you have bound the table and table column.

In your description, the attribute "CmpDate" seems to be outside of node "TableNode".

Armin