Wow that is a lot more code then I had. I was so close to getting it working with this code:
If eventObj.Operation = "Insert" Then
Dim objDate
Dim objWeek
Set objDate = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:tblTasks/@dteDate")
Set objWeek = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:tblTasks/@txtWeek")
objWeek.text = DatePart("ww", objDate.text)
End If
But the code above only works for the first row in my repeating table. I tried using this line
Set objDate = eventObj.Source.selectSingleNode("@dteDate")
Set objWeek = eventObj.Source.selectSingleNode("@txtWeek")
instead of this line
Set objDate = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:tblTasks/@dteDate")
Set objWeek = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:tblTasks/@txtWeek")
but them I get this error:
"A text node child of an attribute may not be passed as the context node for an XSLT transform or an XPath query."
I would rather get this code working before trying yours. Also yours looks like it is in C#? Why do I only have options for vbscript and jscript? I would like to just stick with vbscript. It is so close to working. Does anyone know how to fix the code so it will work in my repeating table?
Thanks,
Kurt