Rules not always firing

Forums Classic DFFS Rules not always firing

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #19701
      Ivan Wilson
      Participant

      I have a new form where I set a people picker field to the current user in JavaScript. This is called from a rule configured to run when the form is ready.

      This then triggers a rule that runs when the people picker field is changed.

      This works fine most of the time, but sometimes (approx once every 20 times) the on-change rule is not fired. The browser debug does not show any errors. It feels like the rule to set the field is firing before the on-change trigger is registered.

      I’m using DFFS 4.4.3.37.

      Any suggestions on how to fix this?

    • #19734
      Alexander Bautz
      Keymaster

      Do you use custom code to set the people picker, or use the “Set field value” section in the rule?

      Alexander

    • #19751
      Ivan Wilson
      Participant

      I’ve tried both approaches. I found that setting the field using the Set Field Value section in a rule did not trigger the “On Change” rule I set up.

      Setting it using JavaScript seems to work most times, but not every time. Here is the code I’m using. This is called from a rule that files when the form is ready.

      setFieldValue("Manager", _spPageContextInfo.userLoginName);
    • #19811
      Alexander Bautz
      Keymaster

      I guess there must be a timing issue. Could you try wrapping it like this to see if it behaves better:

      setTimeout(function(){
          setFieldValue("Manager", _spPageContextInfo.userLoginName);
      },1500);

      Any difference?

      Alexander

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