Rule not undoing actions

Home Forums Modern DFFS Rule not undoing actions

Viewing 3 reply threads
  • Author
    Posts
    • #38853
      Amal Vellappillil
      Participant

        Hi Alex,

        I noticed that rules are not undoing its actions when rules go from False to True to False. Here are the details:
        DFFS v1.2.11
        RULE
        —-
        Field1 = “Yes”
        Field is changed from initial value
        Action: prepare an email to send automatically

        TEST results (with debugging on)
        ————
        – Form load: Rule state: match = FALSE (Field1 = No)
        – Field1 changed to Yes. Rule state: match = TRUE (email was added to be sent on form save)
        – Field1 changed back to No. Rule state: match = FALSE
        – dffs_emailActions still have the email that was prepared when Field1 was changed to Yes. This should have been removed.
        – On save, the email still gets sent out.

        I have attached a screenshot of the dev console with debugging on. I just noticed this with email action. I am not sure if other actions are affected (I didn’t test either).

        Let me know if you need any additional information.

        Thank you

      • #38855
        Alexander Bautz
        Keymaster

          Hi,
          I have tested using this setup on a boolean field and it works as expected. Maybe I misunderstood how you had set it up, but check if you have configured it using the “If no” and using the “Prevent email from being sent” action as shown in the attached screenshot.

          Alexander

        • #38859
          Amal Vellappillil
          Participant

            So is it necessary to use “IF NO” condition branch to revert actions (like prepare email) that was once triggered before saving the form?

            In my above setup the rule was matched to true once and it went to the “IF YES” branch and performed the action – prepare email. But the user quickly reverted the field value back (boolean) which caused the rule to matched = false. I do not have “IF NO” branch setup for this rule. My question is do we need to specify explicitly in the “IF NO” branch of this rule condition to revert the action which was once triggered (in this example prepare email)?

          • #38864
            Alexander Bautz
            Keymaster

              Yes, you must explicitly set all the actions for when the rules is evaluated to FALSE in the “If no” section. This is a change form how it was done in the Classic DFFS, but to the better I believe – as the rule reversing caused a lot of problems in complex forms.

              Having it as an explicit action makes it much easier to keep track of what is actually going on in the rules.

              Alexander

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.