Problem disabling a button in repeating section - InfoPath Dev
in

InfoPath Dev

Problem disabling a button in repeating section

Last post 12-07-2010 09:24 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-07-2010 04:09 AM

    Problem disabling a button in repeating section

     I have a form with a repeating section, which contains a button to send email.  After the email is sent from one instance of the section, I want to disable that button in that instance.

     I've tried  to disable the button instance by populating another field in the repeating section after the email is sent, and then using conditional formatting on the button.

    The ENABLED field has a default value of "YES". 

     After the email is sent, I set a single instance of the value to "NO" in the click event. :  XDocument.DOM.selectSingleNode("/my:myFields/my:group1/my:Enabled").text = "NO";

     This consistently sets every instance of the ENABLED field to "NO" and so disables the Button in every instance of the repeating group.

     Ideas?      Thanks much.

     

     

  • 12-07-2010 04:30 AM In reply to

    Re: Problem disabling a button in repeating section

    It would probably have to be something like /my:myFields/my:group1/my:Enabled[3] or /my:myFields/my:group1[3]/my:Enabled (I can't remember which one is correct) so you select only the one row and not the entire column in your repeating table.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 12-07-2010 06:51 AM In reply to

    Re: Problem disabling a button in repeating section

     Trying it but no luck so far...XDocument.DOM.selectSingleNode("/my:myFields/my:group5/my:Enabled[1]").text = "NO";   and every instance turns to NO.

     

    I thought that  XDocument.DOM.selectSingleNode     got the current instance of the group.

  • 12-07-2010 09:24 AM In reply to

    Re: Problem disabling a button in repeating section

    I don't understand why you are using code for this? Is the button inside the repeating section? I'm pretty sure that you can use a rule to set a field's value and it will only set the current field, as long as the button is inside the repeating section....

    Hilary Stoupa

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