1 secondary repeating tabelset containt information from a webservice
1 primary repeating table that i'm filling up with information from the secondary tableset
******
[ code]
var myclone=XDocument.DOM.selectSingleNode("/my:myFields/my:R_group/my:RT_directreports").cloneNode(true); //clone of primary datatable
XDocument.DOM.selectNodes("/my:myFields/my:R_group/my:RT_directreports").removeAll(); //make sure there's nothing in before filling up
var nodes=XDocument.GetDOM("pricing").selectNodes("/dfs:myFields/dfs:dataFields/tns:pricingResponse/tns:pricingResult/NewDataSet/Table"); //secondary datasource
for (var i=0; i < nodes.length; i++)
{
var curregion=nodes(i).selectSingleNode("REGION").text ; //fetch current region
--> HERE<--
I'ld like to retrieve the value of the previous rowset from the secondary datasource and then do a compare..
If it the previous sibling would be different (region change from let's say 'USA' to 'EMEA' or "LATAM'", i'ld first enter a blank tableline - to make it more distinguishable.
//XDocument.UI.Alert(curregion + prevregion);
myclone.selectSingleNode("my:F_Region").text = nodes(i).selectSingleNode("REGION").text; // fill primary cloned rowset with datafields from secondary rowset
myclone.selectSingleNode("my:F_Country").text = nodes(i).selectSingleNode("C").text;
myclone.selectSingleNode("my:F_Lastname").text = nodes(i).selectSingleNode("SN").text;
myclone.selectSingleNode("my:F_Firstname").text = nodes(i).selectSingleNode("GIVENNAME").text;
etc.etc..
I looked at preceding-sibling stuff but find a bit complex to get through
?? var prevregion=nodes(i).selectSingleNode("preceding-sibling::REGION").text ; //fetch previous region
tnxs
K