Problem disabling button used with Repeating Table - InfoPath Dev
in

InfoPath Dev

Problem disabling button used with Repeating Table

Last post 04-18-2011 09:20 AM by g21cincy. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-14-2011 11:54 AM

    • g21cincy
    • Top 150 Contributor
    • Joined on 10-20-2008
    • Cincinnati, OH
    • Posts 64

    Problem disabling button used with Repeating Table

    I have a repeating table that has a column named Complete and in that column are checkboxes to say if that row has been completed(checked) or not completed(not checked). Under the repeating table I have a button labeled Complete. What I want is to have the 'Complete' button to be disabled if none of the check boxes are checked. If someone clicks one of the checks boxes the button would become enabled. Of course if somoene unchecks all of the check boxes the 'Complete' button would go back to disabled. Any help with this would be greatly appreciated.

  • 04-15-2011 05:09 AM In reply to

    Re: Problem disabling button used with Repeating Table

    Hi,

    If I understood correctly, the solution is fairly simple. I'm attaching a sample. Let us know if that's what you were seeking.

    Cheers.

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


  • 04-15-2011 10:02 AM In reply to

    • g21cincy
    • Top 150 Contributor
    • Joined on 10-20-2008
    • Cincinnati, OH
    • Posts 64

    Re: Problem disabling button used with Repeating Table

    Ernesto,

     Thanks for that example. I think I saw it done that way online but wasn't sure how to get it to say 'All occurrences of variable = '. I went to the expression to see how you did that.

     I didn't mention in my 1st post that the repeating table is a secondary data source. It automatically retrieves the data when the form is opened. I have my expression in my button correct to say "All occurrences of Completed = no". The problem I'm having is that the button doesn't show up Disabled at first until I check all of the check boxes then uncheck them all. Then it starts to work how I want it.

    Any ideas?

    Thanks,

  • 04-15-2011 04:29 PM In reply to

    Re: Problem disabling button used with Repeating Table

    Hi there,

    What's happening is that the initial value of blank checkboxes in your secondary datasource is not set to 'no'. When you uncheck a chckbox, IP looks at what it should be when it's unchecked and sets it to 'no', but it doesn't make this adjustment when you open the form.

    It will probably be easier to change the string you're comparing checkboxes to in IP than to change the default value of your secondary datasource, so here's what you do:

    1. Add a button to the repeating table row in design mode and add a rule to it: Show a dialog expression (note that the initial setting is Show a Dialog Message, you'll need to change this in the dropdown box, then click the 'fx' button, then select your checkbox from the field-selector) <Name of Checkbox>
    2. Now, preview your form and click the button in one of the rows you've never checked/unchecked;
    3. Then change the string 'no' that you've been using to whatever the dialog box says.


    Have a great day!
  • 04-18-2011 09:20 AM In reply to

    • g21cincy
    • Top 150 Contributor
    • Joined on 10-20-2008
    • Cincinnati, OH
    • Posts 64

    Re: Problem disabling button used with Repeating Table

    Thanks Ernesto and qwerty for helping out. I was able to get the solution with both of your help!

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