Using a checkbox to update drop down lists in form with repeating sections - InfoPath Dev
in

InfoPath Dev

Using a checkbox to update drop down lists in form with repeating sections

Last post 04-18-2007 11:36 PM by Shiva. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-18-2007 08:33 AM

    Using a checkbox to update drop down lists in form with repeating sections

    I'm designing an InfoPath 2003 form template. It contains a repeating section with a drop down list in it and can contain anything from 1 to x rows. Each drop down list can be set to one of two values: "Approved" or "Rejected".

    I want to put a check box at the bottom of the form that will (when ticked) set all the drop down lists that do not have the value "Rejected" to the value "Approved". So I have added the following rule to the check box:

    Condition: checkbox=TRUE AND status!="Rejected"

    Action: Set a field's value: @AuthStatus="Approved"

    However, when I load a form and set one or more of the drop down lists to 'Rejected' and then tick the box, all the drop down lists are set to 'Approved', not just the ones that are not set to 'Rejected'.

    Can anyone guide me as to where I am going wrong?

    Mark.

  • 04-18-2007 11:36 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Using a checkbox to update drop down lists in form with repeating sections

    Hi Mark,

    By using code we can get the all the nodes which have the vlaue is 'Rejected'. You can the belwo write the onAfterChange event.

    IXMLDOMNodeList rejectedNodes = GetNodes("/../../my:repeatingNodeName[@AuthStatus = 'Rejected']");

    forech(IXMLDOMNode rejectNode in rejectedNodes)

    {

    rejectNode.text = "Approved";

    }

     

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