InfoPath 2007 field values for current row in a repeating table - InfoPath Dev
in

InfoPath Dev

InfoPath 2007 field values for current row in a repeating table

Last post 06-10-2007 03:27 PM by Jonathanlsmith. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-09-2007 12:33 PM

    InfoPath 2007 field values for current row in a repeating table

    I have seen several posts about retrieving field values for the current row in a repeating table from the table changing event, but they dont seem to work in InfoPath 2007. 

     Im using VS 2005 and VB.Net....
     

     This statement returns the value of the OtherPartiesName for the first row of the repeating table:

    e.Site.SelectSingleNode("/dfs:myFields/dfs:dataFields/ns1:GetRequestResponse/ns1:GetRequestResult/ns1:OtherParties/ns1:OtherParty/ns1:OtherPartiesName",me.NamespaceManager).Value

    So my xpath is /dfs:myFields/dfs:dataFields/ns1:GetRequestResponse/ns1:GetRequestResult/ns1:OtherParties/ns1:OtherParty/ns1:OtherPartiesName

    I dont know if this matters or not, I am using a web service as my main data connection....
     

    Reading other posts, I should be able to be able to determine the field value for the current row from the row changing event by using a statement similar to

     
    e.Site.SelectSingleNode("/my:myfields/my:OtherPartiesName",me.NamespaceManager).Value

    But this returns "Nothing".

     Here is the inner xml for the row changing event:

    <OtherPartiesName xmlns="http://thefirm.com/webservices/">STATE UNIVERSITY</OtherPartiesName>
    <OtherPartiesRelationship xmlns="http://thefirm.com/webservices/">GRANTOR</OtherPartiesRelationship>
    <OtherPartiesPosition xmlns="http://thefirm.com/webservices/">Adverse</OtherPartiesPosition>
     

    Could someone point me in the right direction??   I guess another question I have is how to determine current row number when the event is triggered.

     

    Thanks, close to pulling my hair out....
     

  • 06-10-2007 01:37 PM In reply to

    Re: InfoPath 2007 field values for current row in a repeating table

    I figured out how to access a row using the xpath:

    e.Site.SelectSingleNode("/dfs:myFields/dfs:dataFields/ns1:GetRequestResponse/ns1:GetRequestResult/ns1:OtherParties[1]/ns1:OtherParty/ns1:OtherPartiesName",me.NamespaceManager).Value

     But I still dont understand how to determine the current row when a row changing event fires.  Does anyone have any ideas on how to determine the current row?  e.site.???

     

    Thanks! 

     

    Thanks.
     

     

  • 06-10-2007 03:27 PM In reply to

    Re: InfoPath 2007 field values for current row in a repeating table

    I figured this out, it makes sense now that I got it working....

    e.Site.SelectSingleNode("ns1:OtherPartiesName",me.NamespaceManager).innerxml

     
    My xpath indicates my namespace is "ns1" and not "my", I hope this may help someone else.
     

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.