Hello,
I have a repeating table that has a button to go get the "ExtPartNum" from another view called "Get Part" and also set the CurrentRow field from my Line field. The "Get Part" view is a search with a text box and button to retrieve a web service and fill out the repeating table with a matching Part Number pattern. So I created a rule to set a field value for the main view's ExtPartNum to equal to the selected PartNum. Here is my Source code below for those 2 button rules for InfoPath. I get this error when clicking on the button on the Get Part view.
Error :
System.Xml.XPath.XPathException
Expression must evaluate to a node-set.
Rule on Main View:
<xsf:ruleSet name="ruleSet_13">
<xsf:rule caption="Rule 1" isEnabled="yes">
<xsf:assignmentAction targetField="../../my:CurrentRow" expression="my:line"></xsf:assignmentAction>
<xsf:switchViewAction view="Get Part"></xsf:switchViewAction>
</xsf:rule>
</xsf:ruleSet>
Rule on Get Part View:
<xsf:ruleSet name="ruleSet_14">
<xsf:rule caption="SetExtPartNum" isEnabled="yes">
<xsf:assignmentAction targetField="xdXDocument:get-DOM()/my:travelRequest/my:group1/my:Row[position() = /my:travelRequest/my:CurrentView]/my:ExtPartNum" expression="ns4:PartNumber"></xsf:assignmentAction>
<xsf:switchViewAction view="Create New Request"></xsf:switchViewAction>
</xsf:rule>
</xsf:ruleSet>