Wait for Condition to check if the state value has changed

snowuser111
Kilo Guru

HI Guys,

Need help.

I have created a workflow and stuck at one place if you can guide me.

-I have tablea and tableB

-tableB has a field reference to tablea (in tableb i have field called fieldb -->reference to tablea number say 'recorda')

-i have created workflow in tableb and now at some point of time i need that if recorda status = active status of tableb should also be active.

-i have put "wait for condition" and in that activity gave condition tablea.status = active OR tablea.status = cancelled----nd then switch to check the status.

-now i want if tablea.status = active , then tableb status also to be   = active and if tablea.status = cancelled, then tableb status also to be   = cancelled

-but i see workflow to be paused at Green only though i update the recorda.status = active OR cancelled.

Please suggest where am i going wrong or need t use some other activity

Thanks

1 ACCEPTED SOLUTION

nishailame
ServiceNow Employee
ServiceNow Employee

Can you give us a screenshot of your activity how you are setting these conditions? You need to use a script if you are checking fields on two different table.


Also, as suggested by Pradeep, if you want to set the value of field in table b with reference to table a's field value, you can use BR.




Thank you.


View solution in original post

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Snow,



If I get your req correctly then you want to set the record status of table B based on table A. If yes then you need to create an AFTER business rule on table A to update the records of table B.


http://wiki.servicenow.com/index.php?title=Business_Rules


Arindam Ghosh
Mega Guru

Are you using scripts or condition using filters in Wait for Condition?


nishailame
ServiceNow Employee
ServiceNow Employee

Can you give us a screenshot of your activity how you are setting these conditions? You need to use a script if you are checking fields on two different table.


Also, as suggested by Pradeep, if you want to set the value of field in table b with reference to table a's field value, you can use BR.




Thank you.


nishailame
ServiceNow Employee
ServiceNow Employee

If you are checking in script it should be fine. But if you are using related field in conditions, then it won't work. That's a bug in activity. We will fix that in upcoming releases.



Note: if workflow is on table B, any update on table A fields won't notify the workflow. Wait condition should be on table B.


 


Thanks.


PS: Hit like, Helpful, Correct and Endorse, if it answers your question.