cancel
Showing results for 
Search instead for 
Did you mean: 

moving the records within a node

Former Member
0 Kudos

Hi,

Can you please tell me How to move the records within a node ?

Thanks,

Ravi.

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Ravi,

Use this API which is associated with each node.


wdContext.node<YOUR_NODE_NAME>().swapElements(index1, index2);

where:

index1: from index.

index2: to Index.

I hope this solve your issue. If you need any further information please let me know.

Thanks and Regards,

Pravesh

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

We have 2 option to move records.

One is moving records from one node to another node

WDCopyService.copyElements(wdContext.nodeSource(), wdContext.nodeDestination());

But in that case , all the context attribute name and type of both the node should be same.

another thing is that, you need to get the context attribute value of the source node and set the same value to the context attribute value of the destination node.In this case no need to keep the same name of attribute.

Like this

<nodeName>.setZeffect_Enddate(getDBFormat(wdContext.current<Node>Element().getEffectiveEndDate()));

thanks

Kanai

Former Member
0 Kudos

Hi,

You can use this for moving elements in node

wdContext.nodeAbc().moveElement(index1,index2);

Regards

Trilochan