Rules that don't fire when editing - InfoPath Dev
in

InfoPath Dev

Rules that don't fire when editing

Last post 04-25-2016 07:41 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-21-2016 06:10 AM

    Rules that don't fire when editing

    I have a fairly elaborate form that sets up several rounds of SharePoint approval workflows for a particular project. Here's how it works:

    Each project has a set of "roles" (electrical engineer, mechanical engineer, etc), each filled by a single person. I accomplish this with a set of people pickers--one for each role.

    I have a field of multiple choice check boxes for each round of the review ("first round review", "second round review", etc), indicating which roles participate in that round of approvals.

    When the form is submitted, I have rules that look at the check boxes to see which roles are required, then pulled the accountID value from that role to fill another field ("first round electrical engineer", "second round electrical engineer", "second round mechanical engineer", etc).

    The rules look like this:

    [Any occurrence of Value in first round review] IS EQUAL TO "Electrical Engineer" AND
    [Electrical Engineer AccountId] IS NOT BLANK
    set Field: [first round electrical engineer: AccountId] to [electrical engineer AccountId]

    Make sense?

    It works when I create a project from scratch. The rules fire properly and the 'first round electrical engineer' field is filled (for example). I can then kick off the approval workflows.

    The problem arises when I go back in and edit. If I check off a new box to indicate another role is required in a particular round of approval, the rules don't fire.

    I'm at a total loss.
  • 04-21-2016 06:49 AM In reply to

    Re: Rules that don't fire when editing

     I'd test each rule and role. Add a helper field or 2. What X = X what is the actual result? Is it what you are expecting or does the form see something different? Do you need to add the option to your rules, stop if this rule is met?

  • 04-21-2016 08:11 AM In reply to

    Re: Rules that don't fire when editing

    wilkies0106aw:

     I'd test each rule and role. Add a helper field or 2. What X = X what is the actual result? Is it what you are expecting or does the form see something different? Do you need to add the option to your rules, stop if this rule is met?



    Good advice. I've confirmed that the rules ARE firing. But for some reason, the field isn't being updated. The same rule that populates a field when the form is first submitted doesn't do so when it's updated.
  • 04-21-2016 12:54 PM In reply to

    Re: Rules that don't fire when editing

    If the rules were firing, the field would be being set by them. :) Usually, for me, this means I am setting the wrong field, or have some other logic incorrect. Remember, rules only fire when the field they are on changes (unless they are form load / submit rules).
    Hilary Stoupa

  • 04-21-2016 01:26 PM In reply to

    Re: Rules that don't fire when editing

    Hilary Stoupa:
    If the rules were firing, the field would be being set by them. :) Usually, for me, this means I am setting the wrong field, or have some other logic incorrect. Remember, rules only fire when the field they are on changes (unless they are form load / submit rules).
    I mean that the "triggers" are working. When I add an additional action to the rule ("set testfield to 1") that action gets accomplished. But these are "on submit" rules. Hmm. Maybe I should tie them to the field that changes. Hmmm. The field that's changing is a list of check boxes. Maybe I don't understand the logic of how to evaluate those (except that it works fine when I initially submit the form). Time to dive back in.
  • 04-21-2016 02:08 PM In reply to

    Re: Rules that don't fire when editing

    Feel free to attach your template to a reply under the Options tab w/ some info on where to look for rules if you'd like a second set of eyes. :)
    Hilary Stoupa

  • 04-22-2016 10:01 AM In reply to

    Re: Rules that don't fire when editing

    Very generous of you to offer! I've attached the template. The rules are under Form Submit--the ones that start with "Assign". There are lots, but they all do the same basic action (I'm sure it's not very efficient how I've done it. I'm still a relative newb.) Thanks in advance for any insight you can offer.
  • 04-25-2016 07:41 AM In reply to

    Re: Rules that don't fire when editing

     Ohhhhhhhhhhh. This is a SharePoint List form & you are setting a people picker!!! I just ran into this recently - I could use rules to set a people picker in a new form, but if I was editing, the rules to set the people picker DID NOT WORK and it also made me think I was going mad.

    http://sharepoint.stackexchange.com/questions/80872/infopath-2010-rule-on-people-picker-behaves-as-expected-for-new-items-but-fails
    http://www.infopathdev.com/forums/p/21672/83648.aspx

    I ended up using a SharePoint workflow.... 

    Hilary Stoupa

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