cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer values within a context

Former Member
0 Kudos

Hi all,

Anybody knows how to assign the value of a DropDownByIndex element (Attribute A10 in Node N1) to another element in another node (Attribute A20 in Node N2) in the same View Context. The structure of the View context is as follows.

NodeN1

-Attrib A10

Node N2

-Attrib A20

-Attrib A21

-Attrib A22

-Attrib A23

Regds

Thiru

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thiruvengadam Dorairaj,

You can do as follows:

If both data types of A10 and A20 are same,

wdContext.currentNodeN2Element().setA20(wdContext.currentNodeN1Element().getA10())

Thanks,

Shiva

Answers (3)

Answers (3)

abhijeet_mukkawar
Active Contributor
0 Kudos

hi,

I hope attribute here you are talking about are value attribute, do as follows,

IPrivate<View name>View.INodeN1Element eleN1 = wdContext.currentNodeN1Element();

IPrivate<View name>View.INodeN2Element eleN2 = wdContext.currentNodeN2Element();

eleN2.setAttributeA20(eleN1.getAttribuiteA10()); // this will do the assignment task

i assumed your context is defiend design time and attribute A10 etc are value attributes

hope it helps

regards

sid_sunny
Contributor
0 Kudos

Hi Thiruvengadam,

Try this

IWDNodeElement node = wdContext.nodeDropDownByIndexVNode().getElementAt(10);

wdContext.currentNodeN2Element.setAttr20(node.getAttributeAsText("AttrA10"));

Regards

Sid

Former Member
0 Kudos

Hi

Try to set the attribute by writing code