on 09-09-2008 3:42 PM
I am trying to update the attribute on a child node and cannot get past the first record.
Context:
ParentNode 0-N
-- ChildNode 1-1
-- ChildAttribute1
-- ParentAttribute1
-- ParentAttribute2
I need to loop through all Parent Nodes and update the ChhildAttribute1 with the value from ParentAttribute2
ParentNodeNode thisNode = Context.nodeParentNode();
int elementCount = thisNode.size();
for (int i = 0; i < elementCount; i) {
setLeadSelection(i);
thisNode.nodeChildNodeNode().currentChildNodeElement().setChildAttribute1(thisNode.getElementAt(i).getAttributeValue("ParentAttribute1"));
}
This does not work. It does not give me an error but does not populate the val;ues either...
Help .
Glenn,
Where are you populating your parent node? Since cardinality of your parent node is 0-N, there will be no default element assigned.
In your loop, value of elementCount will be 0, so there is no error but no results either.
You may want to take a look at [this tutorial|/docs/DOC-8061#63].
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Has your child node singleton = true? Every time the lead selection in a parent node changes, all singleton child nodes must be rebuilt. You can try with a supply function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.