Changing the value of one field in my table for all rows in the table - InfoPath Dev
in

InfoPath Dev

Changing the value of one field in my table for all rows in the table

Last post 10-24-2008 12:25 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-24-2008 12:05 PM

    Changing the value of one field in my table for all rows in the table

    I am trying to use custom code on a button to change the value of one field in every row of my table from Yes to No.  Has anyone tried this?

  • 10-24-2008 12:25 PM In reply to

    Re: Changing the value of one field in my table for all rows in the table

    I'm not sure why you are using code for this. Doesn't a rule, like I suggested in the PM I sent you, work?

    If you want to use code, you'll need to get the repeating node and loop through it, setting the value of the field.

    For example (C#, 2007 Object Model):

    XPathNodeIterator nodes = MainDataSource.CreateNavigator().Select("/my:myFields/my:group1/my:group2", this.NamespaceManager);
          foreach (XPathNavigator node in nodes)
          {
               node.SelectSingleNode("my:field3", this.NamespaceManager).SetValue("yes");
           }
    Hilary Stoupa

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