Skip to main content
In my process I have three activities that happen in parallel. Each one of these processes uses a different view to have data entered. When the each activity finishes it saves it's data back into the infopath form which causes data that is already in the form to be overwritten.

So I am saving the data into Process fields and once the parallel processing is finished I am attemplting to insert this values into the form.

The values are in repetitive fields and I am not sure how to set the activity data for these fields so the next time the data is written back to the infopath form this data is entered into the form.

I am attempting to use the last() function to insert the data into the last repating node but am receiving the error

/my:PASS0PDApproval

The insert code is as follows:

/my:PASS0PDApproval", TargetField)

K2.Synchronous = True


Any ideas?
Well I have tried some work arounds and I think I have moved forward. Now I am getting the error

XML value not supplied

and my code is:
Sub Main(ByVal K2 As ServerEventContext)

Dim SourceField As Object
Dim i As Integer
Dim XmlNodeList As System.Xml.XmlNodeList

XmlNodeList = SourceCode.K2Utilities.XMLFieldMod.GetXMLNodeList(K2.ActivityInstanceDestination.XmlFields("K2InfoPathSchema").Value,"my:myFields/my:PASS0PDApprovalGroup/my:PASS0PDApprovalRepeat/my:PASS0PDApproval")
SourceField = K2.ProcessInstance.DataFields("PASS0ApprovalPD").Value

i= XmlNodeList.Count

XmlNodeList.Item(i).InnerXml = SourceField

K2.Synchronous = True
End Sub


I read that this error is sometimes caused by the application trying to read a blank in XML. These nodes are blank (could this be the problem)and I am trying to insert values into them.

Reply