Business rule for clearing a value is not working

Cupcake
Mega Guru
 

I created a catalog item that has a variable called New Information Needed (this variable is a type = Yes/No). That variable is a Yes/No variable type and is REQUIRED. That variable is only visible on Task # 2 in my workflow which has a Rollback activity. So when the wf starts, Task 1 generates. I close complete the task, then Task # 2 generate and the New Information Needed variable is required. When you answer "yes" to that question and then mark the task Closed Complete - the rollback activity kicks in - which will cause Task # 2 to change from a state of Closed Complete to a State = Pending.

What I am looking to do is when that state changes to pending I want to clear the value of "Yes" in that task to "blank". I don't want any value in that field.

Here is my business rule which does not seem to be working:

find_real_file.png

 

find_real_file.png

22 REPLIES 22

Ok, new idea! So this business rule is triggered anytime Task 2 is updated and the state changes to -5, so I don't think your rollback would be affecting it. I think the error might be that it's an After BR. So the record as already been saved in the database so setting current objects field isn't enough to save that change. I would recommend changing this to a Before business rule so that the field is set back to false before it's updated in the database. 

Let me know if this works,

Dylan

Dylan thank you for your help. It is still not working. This thing has me stumped. I even changed it as follows. Once I figure it out I will be sure to share with you.

I don't want to bother you anymore. Thanks for the help that you've provided.

 

When to Run: BEFORE (update)

Advanced:

Mike Patel
Tera Sage

Change condition to current.state.changesTo(-5) && current.state.changesFrom(3)

Thank you Mike trying that now. Should it be 

When to run = After update

Yes after