Force Refresh of Rules on change of field value - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Force Refresh of Rules on change of field value

Last post 06-10-2021 03:47 PM by poppyq. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 11-11-2015 12:46 PM

    Force Refresh of Rules on change of field value

     Hi: I am fairly new to InfoPath development, and have run into an issue, was wondering if someone could guide me.

    I have an InfoPath 2013 form that is filled out initially by a user. It is an Audit form. Other users are assigned tasks from this. Each task is in a row, with the users email, and a date of completion. The number of users can change from one month to the next, so the rows are dynamically created.

    The first user (who is the Auditor) then reopens the form when the other users have supposedly filled in their data including the date. The Auditor checks the entries and fills in the Audited Complete Date. I have been asked to disable the submit button for the Auditor, if not all of the task completion dates have been filled in. So if even one of the dates is blank, then disable the submit button.

     I have a rule for each of the task rows on the  taskDateCompleted field. (numbered 1 to 20)
    Condition:   If AuditChampionReviewDate != "" and  TaskDateCompleted1 !="" then
    Action:      Set the field value  TaskDateFilledCount = TaskDateFilledCount + 1

     So this gives me a count of all of the rows that have the DateofCompletion filled in 


    When that AuditChampionReviewDate is filled in, I check the TaskDateFilledCount and if it is less than the total number of Task Rows, then I enable the submit button for the Auditor. If not, then that means that there is one or more TaskDateCompleted fields that are blank.

    My problem is that the AuditChampionReviewDate change from blank to filledin, does not trigger the TaskDateCompleted  Rule.
    Is there a way to trigger/refresh these rules for the TaskDateCompleted when the AuditChampionReviewDate changes from blank to Filledin?


  • 11-11-2015 04:50 PM In reply to

    Re: Force Refresh of Rules on change of field value

     Hmmm. There may be a simpler way to do this. For the conditional formatting on the Submit button, you could just select "Any instance of" the repeating field (in this case the TaskDateCompleted) is blank - there is a little dropdown when you select fields from outside the repeating group when building conditions that lets you specify this - see attached screenshot.

    Hilary Stoupa

  • 11-12-2015 05:17 AM In reply to

    Re: Force Refresh of Rules on change of field value

     Thanks. I had no idea the option existed for "any instance of" when choosing a repeating field. This is just what I am looking for.

  • 11-12-2015 08:01 AM In reply to

    Re: Force Refresh of Rules on change of field value

    Oh, that is so hard to notice - I used InfoPath for a ridiculously long time before I found that. :-)
    Hilary Stoupa

  • 06-10-2021 02:41 PM In reply to

    Re: Force Refresh of Rules on change of field value

    I know this is a very old thread, but I'm having a similar issue. It seems simply that InfoPath does not "redraw" the form when modifying fields in a repeating table. What I mean by that is I have a button in each row that will become enabled when all the fields in that row are populated correctly. The reason I need a button in each row is because it processes that individual row's entries for other calculations. I cannot do code-behind, so I have to do it on each row separately as a button outside the repeating table only processes the most recent entry in the repeating table. With all that said, what is happening is that I fill out all the required fields in the row, but my button is not becoming enabled. However, I can manually force the form to "refresh" by using a separate checkbox to hide and unhide a section. It seems that doing this forces the repeating table to analyze itself and see that all the required items on that row are filled out, and it will then enable the button. This is super annoying, and I haven't been able to find a way to make it process these rules without using something that causes a "redraw" of something in the form. General rules on fields do not seem to trigger this, only something that changes a visual item on the form. I may try adding two rules to the repeating table that unhides and hides a section to trigger this behavior. Hopefully that works. If anyone else has seen this or knows of a better way to handle repeating tables, I'm all for ideas.
  • 06-10-2021 03:30 PM In reply to

    Re: Force Refresh of Rules on change of field value

    Ick. Only thing I can think of off-hand would be to set postback = always on all the controls inside the repeating table - so, right click each text box or other input control, and at the bottom of that menu, select the control's properties. Find the browser tab, see what postback is set to. Setting it to always can be a little disruptive when filling out the form because the form sends data back to the server, but it may be worth a try....
    Hilary Stoupa

  • 06-10-2021 03:47 PM In reply to

    Re: Force Refresh of Rules on change of field value

    I did try having one of the fields set the "show section" rule, but that doesn't work either. What I've done temporarily is add a button to the footer of the repeating table to trigger the show section then hide it again immediately. It works as a "refresh" table button for now. Not ideal, but it's working. Edit: Your idea of forcing postback does work around the issue as well. Since this table will be used by just a subset of users, I may use that instead of forcing them to push a button to "scan" the table again.
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.