cancel
Showing results for 
Search instead for 
Did you mean: 

Set, get attributes between two nodes

Former Member
0 Kudos

Hi all,

I have a context node which has an attribute(of type string) that needs to be copied to another field that corresponds to the attribute of another node.

Please let me know how to do it.

Thanks & Best Regards,

Srilakshmi B

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thank you

Former Member
0 Kudos

Hi,

Make this a calculated attribute and in the get/set method assign the values to the other attribute..

To do this select the attribute and go the properties view and set the calculated property to true and read only to false.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Srilakshmi,

If you binded those two attributes to 2 different input fields,

say the node structure be the following

node1

- val1

node2

- val2

say u copy val2 into val1.

wdContext.currentNode1Element().setVal1(wdContext.currentNode2Element().getVal2());

Regards,

Sam Charles J.

nikhil_bose
Active Contributor
0 Kudos

wdContext.currentTargetNodeElement().setStrAttrubute( 
                                     wdContext.currentSourceNodeElement().getStrAttribute());

or


WDCopyService.copyCorresponding( wdContext.currentSourceNodeElement(), wdContext.currentTargetNodeElement());

former_member192434
Active Contributor
0 Kudos

Hi

use WDCpoyService();

public static void copyCorresponding(Object source, Object target)

thanks