In short - yes.
The following code goes through a secondary data source and creates a task
node in the main dom with child nodes for each attribute in the secondary DOM
task node. This should give you a starting point to adjust for your own
needs.
Michelle
// get task node from main data source to clone
DOMNode ndTask =
(DOMNode)thisXDocument.DOM.selectSingleNode("/my:myFields/my:dataFields/my:Tasks");
// create a node in the main data source for each task item
foreach (DOMNode nd in ndTasks)
{
DOMNode newNode = (DOMNode)ndTask.cloneNode(true);
// populate the child elements of the new task node
for (int i = 0; i < nd.attributes.length; i++)
{
string ndValue = nd.attributes
.nodeValue.ToString();
switch (nd.attributes.nodeName.ToString())
{
case "Title":
newNode.selectSingleNode("/my:Title").text = ndValue;
break;
case "Priority":
newNode.selectSingleNode("/myriority").text = ndValue;
break;
case "Status":
newNode.selectSingleNode("/my:Status").text = ndValue;
break;
case "__Complete":
newNode.selectSingleNode("/myercentageComplete").text = ndValue;
break;
case "Assigned_To":
newNode.selectSingleNode("/my:AssignedTo").text = ndValue;
break;
case "Due_Date":
newNode.selectSingleNode("/myueDate").text = ndValue;
break;
default:
break;
}
}
//append the new task node
thisXDocument.DOM.childNodes[3].childNodes[1].appendChild(newNode);
}
oakridge said:
Is there anyway to populate the main database of the form which is in a
repeating table with repeating data from a secondary source. I have
successfully done this with drop down boxes to return only one field. I now
need to be able to return multiple records and put them into the main
database to be submitted out to SQL. Thanks in advance.